Fix for regression from r26357: send newtalk notifications only if user has that...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 3 Oct 2007 21:13:02 +0000 (21:13 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 3 Oct 2007 21:13:02 +0000 (21:13 +0000)
includes/UserMailer.php

index 5a44ef2..cd15e3a 100644 (file)
@@ -348,9 +348,12 @@ class EmailNotification {
                                        wfDebug( __METHOD__.": user talk page edited, but user does not exist\n" );
                                } elseif ( $targetUser->getId() == $editor->getId() ) {
                                        wfDebug( __METHOD__.": user edited their own talk page, no notification sent\n" );
-                               } else {
+                               } elseif( $targetUser->getOption( 'enotifusertalkpages' ) ) {
+                                       wfDebug( __METHOD__.": sending talk page update notification\n" );
                                        $this->compose( $targetUser );
                                        $userTalkId = $targetUser->getId();
+                               } else {
+                                       wfDebug( __METHOD__.": talk page owner doesn't want notifications\n" );
                                }
                        }