Comments about the position of the convert() call;
[lhc/web/wiklou.git] / includes / UserMailer.php
index 4670eaf..80eb445 100644 (file)
@@ -25,6 +25,8 @@
  * @package MediaWiki
  */
 
+require_once( 'WikiError.php' );
+
 /**
  * Provide mail capabilities
  * @param string $string ????
@@ -230,8 +232,7 @@ class EmailNotification {
                                        if ( ( $enotifwatchlistpage && $watchingUser->getOption('enotifwatchlistpages') ) ||
                                                ( $enotifusertalkpage && $watchingUser->getOption('enotifusertalkpages') )
                                        && (!$currentMinorEdit || ($wgEmailNotificationForMinorEdits && $watchingUser->getOption('enotifminoredits') ) )
-                                       && ($watchingUser->getEmail() != '')
-                                       && (!$wgEmailAuthentication || ($watchingUser->getEmailAuthenticationtimestamp() != 0 ) ) ) {
+                                       && ($watchingUser->isEmailConfirmed() ) ) {
                                                # ... adjust remaining text and page edit time placeholders
                                                # which needs to be personalized for each user
                                                $sent = $this->composeAndSendPersonalisedMail( $watchingUser, $mail, $article );
@@ -308,7 +309,7 @@ class EmailNotification {
                $keys['%24PAGETITLE']        = $pagetitle; # needed for the {{localurl:$PAGETITLE}} in the messagetext, "$" appears here as "%24"
                $keys['$PAGETITLE']          = $pagetitle;
                $keys['$PAGETIMESTAMP']      = $article->mTimestamp;    # this is the raw internal timestamp - can be useful, too
-               $keys['$PAGEEDITDATEUTC']    = $wgLang->timeanddate( $article->mTimestamp, false, false, false, true );
+               $keys['$PAGEEDITDATEUTC']    = $wgLang->timeanddate( $article->mTimestamp, false, false, false );
                $keys['$PAGEMINOREDIT']      = $medit;
                $keys['$PAGESUMMARY']        = $summary;
        
@@ -352,7 +353,6 @@ class EmailNotification {
                        $keys['%24PAGEEDITOR_RAWURL'] = wfUrlencode( $name );
                        $keys['%24PAGEEDITORE']       = $pageeditorUser->getTitleKey();
                        $keys['$PAGEEDITORE']         = $pageeditorUser->getTitleKey();
-                       $keys['$PAGEEDITOR']          = $pageeditorUser->getName();
                        $keys['$PAGEEDITOR']          = $name;
                }
                $body = strtr( $body, $keys );
@@ -395,7 +395,7 @@ class EmailNotification {
                # expressed in terms of individual local time of the notification
                # recipient, i.e. watching user
                $body = str_replace('$PAGEEDITDATE',
-                       $wgLang->timeanddate( $article->mTimestamp, true, false, $timecorrection, true),
+                       $wgLang->timeanddate( $article->mTimestamp, true, false, $timecorrection ),
                        $body);
                
                $error = userMailer( $to, $mail->from, $mail->subject, $body, $mail->replyto );