Merge "Don't send email notifs to blocked users if $wgBlockDisablesLogin is true"
[lhc/web/wiklou.git] / includes / mail / EmailNotification.php
index a024ffe..6c9972c 100644 (file)
@@ -135,7 +135,9 @@ class EmailNotification {
 
                $sendEmail = true;
                // If nobody is watching the page, and there are no users notified on all changes
-               // don't bother creating a job/trying to send emails
+               // don't bother creating a job/trying to send emails, unless it's a
+               // talk page with an applicable notification.
+               //
                // $watchers deals with $wgEnotifWatchlist
                if ( !count( $watchers ) && !count( $wgUsersNotifiedOnAllChanges ) ) {
                        $sendEmail = false;
@@ -480,7 +482,9 @@ class EmailNotification {
                                $wgContLang->userTime( $this->timestamp, $watchingUser ) ),
                        $this->body );
 
-               return UserMailer::send( $to, $this->from, $this->subject, $body, $this->replyto );
+               return UserMailer::send( $to, $this->from, $this->subject, $body, array(
+                       'replyTo' => $this->replyto,
+               ) );
        }
 
        /**
@@ -505,7 +509,9 @@ class EmailNotification {
                                $wgContLang->time( $this->timestamp, false, false ) ),
                        $this->body );
 
-               return UserMailer::send( $addresses, $this->from, $this->subject, $body, $this->replyto );
+               return UserMailer::send( $addresses, $this->from, $this->subject, $body, array(
+                       'replyTo' => $this->replyto,
+               ) );
        }
 
 }