ini_set( 'html_errors', '0' );
set_error_handler( array( 'UserMailer', 'errorHandler' ) );
- if (function_exists('mail')) {
- if (is_array($to)) {
- foreach ($to as $recip) {
- $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers );
- }
- } else {
- $sent = mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers );
+ if (is_array($to)) {
+ foreach ($to as $recip) {
+ $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers );
}
} else {
- self::$mErrorString = 'PHP is not configured to send mail';
+ $sent = mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers );
}
restore_error_handler();
// You may copy this code freely under the conditions of the GPL.
//
-define('USE_ASSERTS', function_exists('assert'));
-
/**
* @todo document
* @private
$edits = array();
$xi = $yi = 0;
while ($xi < $n_from || $yi < $n_to) {
- USE_ASSERTS && assert($yi < $n_to || $this->xchanged[$xi]);
- USE_ASSERTS && assert($xi < $n_from || $this->ychanged[$yi]);
+ assert($yi < $n_to || $this->xchanged[$xi]);
+ assert($xi < $n_from || $this->ychanged[$yi]);
// Skip matching "snake".
$copy = array();
while (list ($junk, $y) = each($matches))
if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
- USE_ASSERTS && assert($k > 0);
+ assert($k > 0);
$ymids[$k] = $ymids[$k-1];
break;
}
while (list ( /* $junk */, $y) = each($matches)) {
if ($y > $this->seq[$k-1]) {
- USE_ASSERTS && assert($y < $this->seq[$k]);
+ assert($y < $this->seq[$k]);
// Optimization: this is a common case:
// next match is just replacing previous match.
$this->in_seq[$this->seq[$k]] = false;
$this->in_seq[$y] = 1;
} else if (empty($this->in_seq[$y])) {
$k = $this->_lcs_pos($y);
- USE_ASSERTS && assert($k > 0);
+ assert($k > 0);
$ymids[$k] = $ymids[$k-1];
}
}
$end = $mid;
}
- USE_ASSERTS && assert($ypos != $this->seq[$end]);
+ assert($ypos != $this->seq[$end]);
$this->in_seq[$this->seq[$end]] = false;
$this->seq[$end] = $ypos;
$i = 0;
$j = 0;
- USE_ASSERTS && assert('sizeof($lines) == sizeof($changed)');
+ assert('sizeof($lines) == sizeof($changed)');
$len = sizeof($lines);
$other_len = sizeof($other_changed);
$j++;
while ($i < $len && ! $changed[$i]) {
- USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
+ assert('$j < $other_len && ! $other_changed[$j]');
$i++; $j++;
while ($j < $other_len && $other_changed[$j])
$j++;
$changed[--$i] = false;
while ($start > 0 && $changed[$start - 1])
$start--;
- USE_ASSERTS && assert('$j > 0');
+ assert('$j > 0');
while ($other_changed[--$j])
continue;
- USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]');
+ assert('$j >= 0 && !$other_changed[$j]');
}
/*
while ($i < $len && $changed[$i])
$i++;
- USE_ASSERTS && assert('$j < $other_len && ! $other_changed[$j]');
+ assert('$j < $other_len && ! $other_changed[$j]');
$j++;
if ($j < $other_len && $other_changed[$j]) {
$corresponding = $i;
while ($corresponding < $i) {
$changed[--$start] = 1;
$changed[--$i] = 0;
- USE_ASSERTS && assert('$j > 0');
+ assert('$j > 0');
while ($other_changed[--$j])
continue;
- USE_ASSERTS && assert('$j >= 0 && !$other_changed[$j]');
+ assert('$j >= 0 && !$other_changed[$j]');
}
}
wfProfileOut( __METHOD__ );