r48625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48624‎ | r48625 | r48626 >
Date:06:11, 20 March 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* Don't use wgLang for dates in emails
Modified paths:
  • /trunk/phase3/includes/UserMailer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/UserMailer.php
@@ -557,7 +557,7 @@
558558 * @private
559559 */
560560 function sendPersonalised( $watchingUser ) {
561 - global $wgLang, $wgEnotifUseRealName;
 561+ global $wgContLang, $wgEnotifUseRealName;
562562 // From the PHP manual:
563563 // Note: The to parameter cannot be an address in the form of "Something <someone@example.com>".
564564 // The mail command will not parse this properly while talking with the MTA.
@@ -571,7 +571,7 @@
572572 # expressed in terms of individual local time of the notification
573573 # recipient, i.e. watching user
574574 $body = str_replace('$PAGEEDITDATE',
575 - $wgLang->timeanddate( $this->timestamp, true, false, $timecorrection ),
 575+ $wgContLang->timeanddate( $this->timestamp, true, false, $timecorrection ),
576576 $body);
577577
578578 return UserMailer::send($to, $this->from, $this->subject, $body, $this->replyto);
@@ -582,7 +582,7 @@
583583 * mailing. Takes an array of MailAddress objects.
584584 */
585585 function sendImpersonal( $addresses ) {
586 - global $wgLang;
 586+ global $wgContLang;
587587
588588 if (empty($addresses))
589589 return;
@@ -591,7 +591,7 @@
592592 array( '$WATCHINGUSERNAME',
593593 '$PAGEEDITDATE'),
594594 array( wfMsgForContent('enotif_impersonal_salutation'),
595 - $wgLang->timeanddate($this->timestamp, true, false, false)),
 595+ $wgContLang->timeanddate($this->timestamp, true, false, false)),
596596 $this->body);
597597
598598 return UserMailer::send($addresses, $this->from, $this->subject, $body, $this->replyto);

Status & tagging log