From 67d4dfeaef5c772e9679a003a6c14531587153db Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Tue, 6 May 2008 12:51:45 +0000 Subject: [PATCH] * (bug 13950) Allow users to watch the user/user talk pages of users they block --- RELEASE-NOTES | 1 + includes/SpecialBlockip.php | 19 ++++++++++++++++++- languages/messages/MessagesEn.php | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b8a352ce4a..c3d2c505ff 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -101,6 +101,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12542) Added hooks for expansion of Special:Listusers * Drop-down AJAX search suggestions (turn on $wgEnableMWSuggest) * More relevant search snippets (turn on $wgAdvancedSearchHighlighting) +* (bug 13950) Allow users to watch the user/user talk pages of users they block. === Bug fixes in 1.13 === diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 61a2910fe3..0ac6bcb213 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -62,6 +62,7 @@ class IPBlockForm { $this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', $byDefault ); $this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', $byDefault ); $this->BlockEmail = $wgRequest->getBool( 'wpEmailBan', false ); + $this->BlockWatchUser = $wgRequest->getBool( 'wpWatchUser', false ); # Re-check user's rights to hide names, very serious, defaults to 0 $this->BlockHideName = ( $wgRequest->getBool( 'wpHideName', 0 ) && $wgUser->isAllowed( 'hideuser' ) ) ? 1 : 0; } @@ -226,13 +227,25 @@ class IPBlockForm { " ); } + + # Watchlist their user page? + $wgOut->addHTML(" + +   + " . + Xml::checkLabel( wfMsg( 'ipbwatchuser' ), + 'wpWatchUser', 'wpWatchUser', $this->BlockWatchUser, + array( 'tabindex' => '11' ) ) . " + + " + ); $wgOut->addHTML("   " . Xml::submitButton( wfMsg( 'ipbsubmit' ), - array( 'name' => 'wpBlock', 'tabindex' => '11' ) ) . " + array( 'name' => 'wpBlock', 'tabindex' => '12' ) ) . " " . Xml::closeElement( 'table' ) . @@ -349,6 +362,10 @@ 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() ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 719027766f..23ab312b4f 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2284,6 +2284,7 @@ Fill in a specific reason below (for example, citing particular pages that were 'ipbotheroption' => 'other', 'ipbotherreason' => 'Other/additional reason:', 'ipbhidename' => 'Hide username from the block log, active block list and user list', +'ipbwatchuser' => "Watch this user's user and talk pages", 'badipaddress' => 'Invalid IP address', 'blockipsuccesssub' => 'Block succeeded', 'blockipsuccesstext' => '[[Special:Contributions/$1|$1]] has been blocked.
-- 2.20.1