Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * @param $realName String: human-readable real name if a string address is given |
38 | 38 | */ |
39 | 39 | function __construct( $address, $name = null, $realName = null ) { |
40 | | - if( is_object( $address ) && $address instanceof User ) { |
| 40 | + if ( is_object( $address ) && $address instanceof User ) { |
41 | 41 | $this->address = $address->getEmail(); |
42 | 42 | $this->name = $address->getName(); |
43 | 43 | $this->realName = $address->getRealName(); |
— | — | @@ -55,11 +55,11 @@ |
56 | 56 | # PHP's mail() implementation under Windows is somewhat shite, and |
57 | 57 | # can't handle "Joe Bloggs <joe@bloggs.com>" format email addresses, |
58 | 58 | # so don't bother generating them |
59 | | - if( $this->name != '' && !wfIsWindows() ) { |
| 59 | + if ( $this->name != '' && !wfIsWindows() ) { |
60 | 60 | global $wgEnotifUseRealName; |
61 | 61 | $name = ( $wgEnotifUseRealName && $this->realName ) ? $this->realName : $this->name; |
62 | 62 | $quoted = wfQuotedPrintable( $name ); |
63 | | - if( strpos( $quoted, '.' ) !== false || strpos( $quoted, ',' ) !== false ) { |
| 63 | + if ( strpos( $quoted, '.' ) !== false || strpos( $quoted, ',' ) !== false ) { |
64 | 64 | $quoted = '"' . $quoted . '"'; |
65 | 65 | } |
66 | 66 | return "$quoted <{$this->address}>"; |
— | — | @@ -79,16 +79,15 @@ |
80 | 80 | */ |
81 | 81 | class UserMailer { |
82 | 82 | static $mErrorString; |
83 | | - |
| 83 | + |
84 | 84 | /** |
85 | 85 | * Send mail using a PEAR mailer |
86 | 86 | */ |
87 | | - protected static function sendWithPear($mailer, $dest, $headers, $body) |
88 | | - { |
89 | | - $mailResult = $mailer->send($dest, $headers, $body); |
| 87 | + protected static function sendWithPear( $mailer, $dest, $headers, $body ) { |
| 88 | + $mailResult = $mailer->send( $dest, $headers, $body ); |
90 | 89 | |
91 | 90 | # Based on the result return an error string, |
92 | | - if( PEAR::isError( $mailResult ) ) { |
| 91 | + if ( PEAR::isError( $mailResult ) ) { |
93 | 92 | wfDebug( "PEAR::Mail failed: " . $mailResult->getMessage() . "\n" ); |
94 | 93 | return Status::newFatal( 'pear-mail-error', $mailResult->getMessage() ); |
95 | 94 | } else { |
— | — | @@ -110,23 +109,23 @@ |
111 | 110 | * @param $contentType String: optional custom Content-Type |
112 | 111 | * @return Status object |
113 | 112 | */ |
114 | | - static function send( $to, $from, $subject, $body, $replyto=null, $contentType=null ) { |
| 113 | + public static function send( $to, $from, $subject, $body, $replyto = null, $contentType = null ) { |
115 | 114 | global $wgSMTP, $wgOutputEncoding, $wgEnotifImpersonal; |
116 | 115 | global $wgEnotifMaxRecips, $wgAdditionalMailParams; |
117 | 116 | |
118 | 117 | if ( is_array( $to ) ) { |
119 | 118 | // This wouldn't be necessary if implode() worked on arrays of |
120 | 119 | // objects using __toString(). http://bugs.php.net/bug.php?id=36612 |
121 | | - foreach( $to as $t ) { |
| 120 | + foreach ( $to as $t ) { |
122 | 121 | $emails .= $t->toString() . ","; |
123 | 122 | } |
124 | 123 | $emails = rtrim( $emails, ',' ); |
125 | | - wfDebug( __METHOD__.': sending mail to ' . $emails . "\n" ); |
| 124 | + wfDebug( __METHOD__ . ': sending mail to ' . $emails . "\n" ); |
126 | 125 | } else { |
127 | | - wfDebug( __METHOD__.': sending mail to ' . implode( ',', array( $to->toString() ) ) . "\n" ); |
| 126 | + wfDebug( __METHOD__ . ': sending mail to ' . implode( ',', array( $to->toString() ) ) . "\n" ); |
128 | 127 | } |
129 | 128 | |
130 | | - if (is_array( $wgSMTP )) { |
| 129 | + if ( is_array( $wgSMTP ) ) { |
131 | 130 | $found = false; |
132 | 131 | $pathArray = explode( PATH_SEPARATOR, get_include_path() ); |
133 | 132 | foreach ( $pathArray as $path ) { |
— | — | @@ -140,20 +139,20 @@ |
141 | 140 | } |
142 | 141 | require_once( 'Mail.php' ); |
143 | 142 | |
144 | | - $msgid = str_replace(" ", "_", microtime()); |
145 | | - if (function_exists('posix_getpid')) |
| 143 | + $msgid = str_replace( " ", "_", microtime() ); |
| 144 | + if ( function_exists( 'posix_getpid' ) ) |
146 | 145 | $msgid .= '.' . posix_getpid(); |
147 | 146 | |
148 | | - if (is_array($to)) { |
| 147 | + if ( is_array( $to ) ) { |
149 | 148 | $dest = array(); |
150 | | - foreach ($to as $u) |
| 149 | + foreach ( $to as $u ) |
151 | 150 | $dest[] = $u->address; |
152 | 151 | } else |
153 | 152 | $dest = $to->address; |
154 | 153 | |
155 | 154 | $headers['From'] = $from->toString(); |
156 | 155 | |
157 | | - if ($wgEnotifImpersonal) { |
| 156 | + if ( $wgEnotifImpersonal ) { |
158 | 157 | $headers['To'] = 'undisclosed-recipients:;'; |
159 | 158 | } |
160 | 159 | else { |
— | — | @@ -166,8 +165,8 @@ |
167 | 166 | $headers['Subject'] = wfQuotedPrintable( $subject ); |
168 | 167 | $headers['Date'] = date( 'r' ); |
169 | 168 | $headers['MIME-Version'] = '1.0'; |
170 | | - $headers['Content-type'] = (is_null($contentType) ? |
171 | | - 'text/plain; charset='.$wgOutputEncoding : $contentType); |
| 169 | + $headers['Content-type'] = ( is_null( $contentType ) ? |
| 170 | + 'text/plain; charset=' . $wgOutputEncoding : $contentType ); |
172 | 171 | $headers['Content-transfer-encoding'] = '8bit'; |
173 | 172 | $headers['Message-ID'] = "<$msgid@" . $wgSMTP['IDHost'] . '>'; // FIXME |
174 | 173 | $headers['X-Mailer'] = 'MediaWiki mailer'; |
— | — | @@ -175,8 +174,8 @@ |
176 | 175 | wfSuppressWarnings(); |
177 | 176 | |
178 | 177 | // Create the mail object using the Mail::factory method |
179 | | - $mail_object =& Mail::factory('smtp', $wgSMTP); |
180 | | - if( PEAR::isError( $mail_object ) ) { |
| 178 | + $mail_object =& Mail::factory( 'smtp', $wgSMTP ); |
| 179 | + if ( PEAR::isError( $mail_object ) ) { |
181 | 180 | wfDebug( "PEAR::Mail factory failed: " . $mail_object->getMessage() . "\n" ); |
182 | 181 | wfRestoreWarnings(); |
183 | 182 | return Status::newFatal( 'pear-mail-error', $mail_object->getMessage() ); |
— | — | @@ -184,9 +183,9 @@ |
185 | 184 | |
186 | 185 | wfDebug( "Sending mail via PEAR::Mail to $dest\n" ); |
187 | 186 | $chunks = array_chunk( (array)$dest, $wgEnotifMaxRecips ); |
188 | | - foreach ($chunks as $chunk) { |
189 | | - $status = self::sendWithPear($mail_object, $chunk, $headers, $body); |
190 | | - if( !$status->isOK() ) { |
| 187 | + foreach ( $chunks as $chunk ) { |
| 188 | + $status = self::sendWithPear( $mail_object, $chunk, $headers, $body ); |
| 189 | + if ( !$status->isOK() ) { |
191 | 190 | wfRestoreWarnings(); |
192 | 191 | return $status; |
193 | 192 | } |
— | — | @@ -205,27 +204,27 @@ |
206 | 205 | } else { |
207 | 206 | $endl = "\n"; |
208 | 207 | } |
209 | | - $ctype = (is_null($contentType) ? |
210 | | - 'text/plain; charset='.$wgOutputEncoding : $contentType); |
| 208 | + $ctype = ( is_null( $contentType ) ? |
| 209 | + 'text/plain; charset=' . $wgOutputEncoding : $contentType ); |
211 | 210 | $headers = |
212 | 211 | "MIME-Version: 1.0$endl" . |
213 | 212 | "Content-type: $ctype$endl" . |
214 | 213 | "Content-Transfer-Encoding: 8bit$endl" . |
215 | | - "X-Mailer: MediaWiki mailer$endl". |
| 214 | + "X-Mailer: MediaWiki mailer$endl" . |
216 | 215 | 'From: ' . $from->toString(); |
217 | | - if ($replyto) { |
| 216 | + if ( $replyto ) { |
218 | 217 | $headers .= "{$endl}Reply-To: " . $replyto->toString(); |
219 | 218 | } |
220 | 219 | |
221 | 220 | wfDebug( "Sending mail via internal mail() function\n" ); |
222 | | - |
| 221 | + |
223 | 222 | self::$mErrorString = ''; |
224 | 223 | $html_errors = ini_get( 'html_errors' ); |
225 | 224 | ini_set( 'html_errors', '0' ); |
226 | 225 | set_error_handler( array( 'UserMailer', 'errorHandler' ) ); |
227 | 226 | |
228 | | - if (is_array($to)) { |
229 | | - foreach ($to as $recip) { |
| 227 | + if ( is_array( $to ) ) { |
| 228 | + foreach ( $to as $recip ) { |
230 | 229 | $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams ); |
231 | 230 | } |
232 | 231 | } else { |
— | — | @@ -238,8 +237,8 @@ |
239 | 238 | if ( self::$mErrorString ) { |
240 | 239 | wfDebug( "Error sending mail: " . self::$mErrorString . "\n" ); |
241 | 240 | return Status::newFatal( 'php-mail-error', self::$mErrorString ); |
242 | | - } elseif (! $sent ) { |
243 | | - //mail function only tells if there's an error |
| 241 | + } elseif ( ! $sent ) { |
| 242 | + // mail function only tells if there's an error |
244 | 243 | wfDebug( "Error sending mail\n" ); |
245 | 244 | return Status::newFatal( 'php-mail-error-unknown' ); |
246 | 245 | } else { |
— | — | @@ -261,7 +260,7 @@ |
262 | 261 | /** |
263 | 262 | * Converts a string into a valid RFC 822 "phrase", such as is used for the sender name |
264 | 263 | */ |
265 | | - static function rfc822Phrase( $phrase ) { |
| 264 | + public static function rfc822Phrase( $phrase ) { |
266 | 265 | $phrase = strtr( $phrase, array( "\r" => '', "\n" => '', '"' => '' ) ); |
267 | 266 | return '"' . $phrase . '"'; |
268 | 267 | } |
— | — | @@ -305,15 +304,15 @@ |
306 | 305 | * @param $minorEdit |
307 | 306 | * @param $oldid (default: false) |
308 | 307 | */ |
309 | | - function notifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid = false) { |
| 308 | + public function notifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid = false ) { |
310 | 309 | global $wgEnotifUseJobQ, $wgEnotifWatchlist, $wgShowUpdatedMarker; |
311 | 310 | |
312 | | - if ($title->getNamespace() < 0) |
| 311 | + if ( $title->getNamespace() < 0 ) |
313 | 312 | return; |
314 | 313 | |
315 | 314 | // Build a list of users to notfiy |
316 | 315 | $watchers = array(); |
317 | | - if ($wgEnotifWatchlist || $wgShowUpdatedMarker) { |
| 316 | + if ( $wgEnotifWatchlist || $wgShowUpdatedMarker ) { |
318 | 317 | $dbw = wfGetDB( DB_MASTER ); |
319 | 318 | $res = $dbw->select( array( 'watchlist' ), |
320 | 319 | array( 'wl_user' ), |
— | — | @@ -327,7 +326,7 @@ |
328 | 327 | foreach ( $res as $row ) { |
329 | 328 | $watchers[] = intval( $row->wl_user ); |
330 | 329 | } |
331 | | - if ($watchers) { |
| 330 | + if ( $watchers ) { |
332 | 331 | // Update wl_notificationtimestamp for all watching users except |
333 | 332 | // the editor |
334 | 333 | $dbw->begin(); |
— | — | @@ -344,7 +343,7 @@ |
345 | 344 | } |
346 | 345 | } |
347 | 346 | |
348 | | - if ($wgEnotifUseJobQ) { |
| 347 | + if ( $wgEnotifUseJobQ ) { |
349 | 348 | $params = array( |
350 | 349 | "editor" => $editor->getName(), |
351 | 350 | "editorID" => $editor->getID(), |
— | — | @@ -352,7 +351,7 @@ |
353 | 352 | "summary" => $summary, |
354 | 353 | "minorEdit" => $minorEdit, |
355 | 354 | "oldid" => $oldid, |
356 | | - "watchers" => $watchers); |
| 355 | + "watchers" => $watchers ); |
357 | 356 | $job = new EnotifNotifyJob( $title, $params ); |
358 | 357 | $job->insert(); |
359 | 358 | } else { |
— | — | @@ -375,7 +374,7 @@ |
376 | 375 | * @param $oldid int Revision ID |
377 | 376 | * @param $watchers array of user IDs |
378 | 377 | */ |
379 | | - function actuallyNotifyOnPageChange($editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers) { |
| 378 | + public function actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit, $oldid, $watchers ) { |
380 | 379 | # we use $wgPasswordSender as sender's address |
381 | 380 | global $wgEnotifWatchlist; |
382 | 381 | global $wgEnotifMinorEdits, $wgEnotifUserTalk; |
— | — | @@ -386,7 +385,7 @@ |
387 | 386 | # 1. EmailNotification for pages (other than user_talk pages) must be enabled |
388 | 387 | # 2. minor edits (changes) are only regarded if the global flag indicates so |
389 | 388 | |
390 | | - $isUserTalkPage = ($title->getNamespace() == NS_USER_TALK); |
| 389 | + $isUserTalkPage = ( $title->getNamespace() == NS_USER_TALK ); |
391 | 390 | |
392 | 391 | $this->title = $title; |
393 | 392 | $this->timestamp = $timestamp; |
— | — | @@ -398,23 +397,23 @@ |
399 | 398 | |
400 | 399 | $userTalkId = false; |
401 | 400 | |
402 | | - if ( !$minorEdit || ($wgEnotifMinorEdits && !$editor->isAllowed('nominornewtalk') ) ) { |
| 401 | + if ( !$minorEdit || ( $wgEnotifMinorEdits && !$editor->isAllowed( 'nominornewtalk' ) ) ) { |
403 | 402 | if ( $wgEnotifUserTalk && $isUserTalkPage ) { |
404 | 403 | $targetUser = User::newFromName( $title->getText() ); |
405 | 404 | if ( !$targetUser || $targetUser->isAnon() ) { |
406 | | - wfDebug( __METHOD__.": user talk page edited, but user does not exist\n" ); |
| 405 | + wfDebug( __METHOD__ . ": user talk page edited, but user does not exist\n" ); |
407 | 406 | } elseif ( $targetUser->getId() == $editor->getId() ) { |
408 | | - wfDebug( __METHOD__.": user edited their own talk page, no notification sent\n" ); |
409 | | - } elseif( $targetUser->getOption( 'enotifusertalkpages' ) ) { |
410 | | - if( $targetUser->isEmailConfirmed() ) { |
411 | | - wfDebug( __METHOD__.": sending talk page update notification\n" ); |
| 407 | + wfDebug( __METHOD__ . ": user edited their own talk page, no notification sent\n" ); |
| 408 | + } elseif ( $targetUser->getOption( 'enotifusertalkpages' ) ) { |
| 409 | + if ( $targetUser->isEmailConfirmed() ) { |
| 410 | + wfDebug( __METHOD__ . ": sending talk page update notification\n" ); |
412 | 411 | $this->compose( $targetUser ); |
413 | 412 | $userTalkId = $targetUser->getId(); |
414 | 413 | } else { |
415 | | - wfDebug( __METHOD__.": talk page owner doesn't have validated email\n" ); |
| 414 | + wfDebug( __METHOD__ . ": talk page owner doesn't have validated email\n" ); |
416 | 415 | } |
417 | 416 | } else { |
418 | | - wfDebug( __METHOD__.": talk page owner doesn't want notifications\n" ); |
| 417 | + wfDebug( __METHOD__ . ": talk page owner doesn't want notifications\n" ); |
419 | 418 | } |
420 | 419 | } |
421 | 420 | |
— | — | @@ -423,7 +422,7 @@ |
424 | 423 | $userArray = UserArray::newFromIDs( $watchers ); |
425 | 424 | foreach ( $userArray as $watchingUser ) { |
426 | 425 | if ( $watchingUser->getOption( 'enotifwatchlistpages' ) && |
427 | | - ( !$minorEdit || $watchingUser->getOption('enotifminoredits') ) && |
| 426 | + ( !$minorEdit || $watchingUser->getOption( 'enotifminoredits' ) ) && |
428 | 427 | $watchingUser->isEmailConfirmed() && |
429 | 428 | $watchingUser->getID() != $userTalkId ) |
430 | 429 | { |
— | — | @@ -453,8 +452,8 @@ |
454 | 453 | |
455 | 454 | $this->composed_common = true; |
456 | 455 | |
457 | | - $summary = ($this->summary == '') ? ' - ' : $this->summary; |
458 | | - $medit = ($this->minorEdit) ? wfMsgForContent( 'minoredit' ) : ''; |
| 456 | + $summary = ( $this->summary == '' ) ? ' - ' : $this->summary; |
| 457 | + $medit = ( $this->minorEdit ) ? wfMsgForContent( 'minoredit' ) : ''; |
459 | 458 | |
460 | 459 | # You as the WikiAdmin and Sysops can make use of plenty of |
461 | 460 | # named variables when composing your notification emails while |
— | — | @@ -466,7 +465,7 @@ |
467 | 466 | $replyto = ''; /* fail safe */ |
468 | 467 | $keys = array(); |
469 | 468 | |
470 | | - if( $this->oldid ) { |
| 469 | + if ( $this->oldid ) { |
471 | 470 | $difflink = $this->title->getFullUrl( 'diff=0&oldid=' . $this->oldid ); |
472 | 471 | $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited', $difflink ); |
473 | 472 | $keys['$OLDID'] = $this->oldid; |
— | — | @@ -478,13 +477,13 @@ |
479 | 478 | $keys['$CHANGEDORCREATED'] = wfMsgForContent( 'created' ); |
480 | 479 | } |
481 | 480 | |
482 | | - if ($wgEnotifImpersonal && $this->oldid) { |
| 481 | + if ( $wgEnotifImpersonal && $this->oldid ) { |
483 | 482 | /* |
484 | 483 | * For impersonal mail, show a diff link to the last |
485 | 484 | * revision. |
486 | 485 | */ |
487 | | - $keys['$NEWPAGE'] = wfMsgForContent('enotif_lastdiff', |
488 | | - $this->title->getFullURL("oldid={$this->oldid}&diff=next")); |
| 486 | + $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastdiff', |
| 487 | + $this->title->getFullURL( "oldid={$this->oldid}&diff=next" ) ); |
489 | 488 | } |
490 | 489 | |
491 | 490 | $body = strtr( $body, $keys ); |
— | — | @@ -505,10 +504,10 @@ |
506 | 505 | $name = $wgEnotifUseRealName ? $editor->getRealName() : $editor->getName(); |
507 | 506 | $adminAddress = new MailAddress( $wgPasswordSender, $wgPasswordSenderName ); |
508 | 507 | $editorAddress = new MailAddress( $editor ); |
509 | | - if( $wgEnotifRevealEditorAddress |
| 508 | + if ( $wgEnotifRevealEditorAddress |
510 | 509 | && ( $editor->getEmail() != '' ) |
511 | 510 | && $editor->getOption( 'enotifrevealaddr' ) ) { |
512 | | - if( $wgEnotifFromEditor ) { |
| 511 | + if ( $wgEnotifFromEditor ) { |
513 | 512 | $from = $editorAddress; |
514 | 513 | } else { |
515 | 514 | $from = $adminAddress; |
— | — | @@ -519,14 +518,14 @@ |
520 | 519 | $replyto = new MailAddress( $wgNoReplyAddress ); |
521 | 520 | } |
522 | 521 | |
523 | | - if( $editor->isIP( $name ) ) { |
524 | | - #real anon (user:xxx.xxx.xxx.xxx) |
525 | | - $utext = wfMsgForContent('enotif_anon_editor', $name); |
526 | | - $subject = str_replace('$PAGEEDITOR', $utext, $subject); |
| 522 | + if ( $editor->isIP( $name ) ) { |
| 523 | + # real anon (user:xxx.xxx.xxx.xxx) |
| 524 | + $utext = wfMsgForContent( 'enotif_anon_editor', $name ); |
| 525 | + $subject = str_replace( '$PAGEEDITOR', $utext, $subject ); |
527 | 526 | $keys['$PAGEEDITOR'] = $utext; |
528 | 527 | $keys['$PAGEEDITOR_EMAIL'] = wfMsgForContent( 'noemailtitle' ); |
529 | 528 | } else { |
530 | | - $subject = str_replace('$PAGEEDITOR', $name, $subject); |
| 529 | + $subject = str_replace( '$PAGEEDITOR', $name, $subject ); |
531 | 530 | $keys['$PAGEEDITOR'] = $name; |
532 | 531 | $emailPage = SpecialPage::getSafeTitleFor( 'Emailuser', $name ); |
533 | 532 | $keys['$PAGEEDITOR_EMAIL'] = $emailPage->getFullUrl(); |
— | — | @@ -588,7 +587,7 @@ |
589 | 588 | // The mail command will not parse this properly while talking with the MTA. |
590 | 589 | $to = new MailAddress( $watchingUser ); |
591 | 590 | $name = $wgEnotifUseRealName ? $watchingUser->getRealName() : $watchingUser->getName(); |
592 | | - $body = str_replace( '$WATCHINGUSERNAME', $name , $this->body ); |
| 591 | + $body = str_replace( '$WATCHINGUSERNAME', $name, $this->body ); |
593 | 592 | |
594 | 593 | $timecorrection = $watchingUser->getOption( 'timecorrection' ); |
595 | 594 | |
— | — | @@ -596,15 +595,15 @@ |
597 | 596 | # expressed in terms of individual local time of the notification |
598 | 597 | # recipient, i.e. watching user |
599 | 598 | $body = str_replace( |
600 | | - array( '$PAGEEDITDATEANDTIME', |
| 599 | + array( '$PAGEEDITDATEANDTIME', |
601 | 600 | '$PAGEEDITDATE', |
602 | 601 | '$PAGEEDITTIME' ), |
603 | | - array( $wgContLang->timeanddate( $this->timestamp, true, false, $timecorrection ), |
| 602 | + array( $wgContLang->timeanddate( $this->timestamp, true, false, $timecorrection ), |
604 | 603 | $wgContLang->date( $this->timestamp, true, false, $timecorrection ), |
605 | 604 | $wgContLang->time( $this->timestamp, true, false, $timecorrection ) ), |
606 | | - $body); |
| 605 | + $body ); |
607 | 606 | |
608 | | - return UserMailer::send($to, $this->from, $this->subject, $body, $this->replyto); |
| 607 | + return UserMailer::send( $to, $this->from, $this->subject, $body, $this->replyto ); |
609 | 608 | } |
610 | 609 | |
611 | 610 | /** |
— | — | @@ -614,17 +613,17 @@ |
615 | 614 | function sendImpersonal( $addresses ) { |
616 | 615 | global $wgContLang; |
617 | 616 | |
618 | | - if (empty($addresses)) |
| 617 | + if ( empty( $addresses ) ) |
619 | 618 | return; |
620 | 619 | |
621 | 620 | $body = str_replace( |
622 | | - array( '$WATCHINGUSERNAME', |
623 | | - '$PAGEEDITDATE'), |
624 | | - array( wfMsgForContent('enotif_impersonal_salutation'), |
625 | | - $wgContLang->timeanddate($this->timestamp, true, false, false)), |
626 | | - $this->body); |
| 621 | + array( '$WATCHINGUSERNAME', |
| 622 | + '$PAGEEDITDATE' ), |
| 623 | + array( wfMsgForContent( 'enotif_impersonal_salutation' ), |
| 624 | + $wgContLang->timeanddate( $this->timestamp, true, false, false ) ), |
| 625 | + $this->body ); |
627 | 626 | |
628 | | - return UserMailer::send($addresses, $this->from, $this->subject, $body, $this->replyto); |
| 627 | + return UserMailer::send( $addresses, $this->from, $this->subject, $body, $this->replyto ); |
629 | 628 | } |
630 | 629 | |
631 | 630 | } # end of class EmailNotification |
— | — | @@ -639,7 +638,7 @@ |
640 | 639 | return UserMailer::rfc822Phrase( $s ); |
641 | 640 | } |
642 | 641 | |
643 | | -function userMailer( $to, $from, $subject, $body, $replyto=null ) { |
| 642 | +function userMailer( $to, $from, $subject, $body, $replyto = null ) { |
644 | 643 | wfDeprecated( __FUNCTION__ ); |
645 | 644 | return UserMailer::send( $to, $from, $subject, $body, $replyto ); |
646 | 645 | } |