From: Brion Vibber Date: Mon, 2 Jun 2008 21:52:57 +0000 (+0000) Subject: * (bug 14367) Failed block no longer adds phantom watchlist entry X-Git-Tag: 1.31.0-rc.0~47230 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=05d46ea6172b6bb52e47e47dc90e011b82aa647e;p=lhc%2Fweb%2Fwiklou.git * (bug 14367) Failed block no longer adds phantom watchlist entry ^demon's patch from https://bugzilla.wikimedia.org/attachment.cgi?id=4945 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a9474a10ea..e30fa58fc1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index d45603572d..903c116a62 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -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;