From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- includes/UserMailer.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'includes/UserMailer.php') diff --git a/includes/UserMailer.php b/includes/UserMailer.php index b6484935..daf8b621 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -188,11 +188,12 @@ class UserMailer { $headers .= "{$endl}Reply-To: " . $replyto->toString(); } + wfDebug( "Sending mail via internal mail() function\n" ); + $wgErrorString = ''; $html_errors = ini_get( 'html_errors' ); ini_set( 'html_errors', '0' ); set_error_handler( array( 'UserMailer', 'errorHandler' ) ); - wfDebug( "Sending mail via internal mail() function\n" ); if (function_exists('mail')) { if (is_array($to)) { @@ -263,9 +264,9 @@ class UserMailer { * */ class EmailNotification { - private $to, $subject, $body, $replyto, $from; - private $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor; - private $mailTargets = array(); + protected $to, $subject, $body, $replyto, $from; + protected $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor; + protected $mailTargets = array(); /** * Send emails corresponding to the user $editor editing the page $title. @@ -471,6 +472,7 @@ class EmailNotification { $keys['$PAGEMINOREDIT'] = $medit; $keys['$PAGESUMMARY'] = $summary; + $keys['$UNWATCHURL'] = $this->title->getFullUrl( 'action=unwatch' ); $subject = strtr( $subject, $keys ); @@ -572,8 +574,13 @@ class EmailNotification { # $PAGEEDITDATE is the time and date of the page change # expressed in terms of individual local time of the notification # recipient, i.e. watching user - $body = str_replace('$PAGEEDITDATE', - $wgContLang->timeanddate( $this->timestamp, true, false, $timecorrection ), + $body = str_replace( + array( '$PAGEEDITDATEANDTIME', + '$PAGEEDITDATE', + '$PAGEEDITTIME' ), + array( $wgContLang->timeanddate( $this->timestamp, true, false, $timecorrection ), + $wgContLang->date( $this->timestamp, true, false, $timecorrection ), + $wgContLang->time( $this->timestamp, true, false, $timecorrection ) ), $body); return UserMailer::send($to, $this->from, $this->subject, $body, $this->replyto); -- cgit v1.2.3-54-g00ecf