* (bug 14367) Failed block no longer adds phantom watchlist entry
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 2 Jun 2008 21:52:57 +0000 (21:52 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 2 Jun 2008 21:52:57 +0000 (21:52 +0000)
^demon's patch from https://bugzilla.wikimedia.org/attachment.cgi?id=4945

RELEASE-NOTES
includes/SpecialBlockip.php

index a9474a1..e30fa58 100644 (file)
@@ -322,6 +322,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   not the main namespace page.
 * (bug 11659) Urldecode image names in galleries
 * (bug 14258, 14368) Fix for subpage renames in replication environments
+* (bug 14367) Failed block no longer adds phantom watchlist entry
 
 
 === API changes in 1.13 ===
index d456035..903c116 100644 (file)
@@ -355,10 +355,6 @@ class IPBlockForm {
                        $this->BlockCreateAccount, $this->BlockEnableAutoblock, $this->BlockHideName,
                        $this->BlockEmail);
 
-               if ( $this->BlockWatchUser ) { 
-                       $wgUser->addWatch ( Title::makeTitle( NS_USER, $this->BlockAddress ) );
-               }
-               
                if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) {
 
                        if ( !$block->insert() ) {
@@ -367,6 +363,10 @@ class IPBlockForm {
 
                        wfRunHooks('BlockIpComplete', array($block, $wgUser));
 
+                       if ( $this->BlockWatchUser ) { 
+                               $wgUser->addWatch ( Title::makeTitle( NS_USER, $this->BlockAddress ) );
+                       }
+
                        # Prepare log parameters
                        $logParams = array();
                        $logParams[] = $expirestr;