From: Chad Horohoe Date: Sun, 21 Sep 2008 13:16:00 +0000 (+0000) Subject: (bug 15642) Remove ability for blocked sysops to block other users. X-Git-Tag: 1.31.0-rc.0~45173 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=40e4947f2dfe819678ab60381f41647611d56af0;p=lhc%2Fweb%2Fwiklou.git (bug 15642) Remove ability for blocked sysops to block other users. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0b5402796f..e8f46dfc1c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -213,6 +213,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN has been blocked more than 10 times. Patch by Matt Johnston. * (bug 12678) Skins don't show Upload link if the user isn't allowed to upload. * Fixed incorrect usage of DB_LAST in Special:Export. Deprecated DB_LAST. +* (bug 15642) Blocked sysops can no longer block other users === API changes in 1.14 === diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index 2157f2345e..422d804a6f 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -314,6 +314,9 @@ class IPBlockForm { # Username block if ( $wgSysopUserBans ) { $user = User::newFromName( $this->BlockAddress ); + if ( $wgUser->isBlocked() && ( $wgUser->getId !== $user->getId() ) ) { + return array( 'cant-block-while-blocked' ); + } if( !is_null( $user ) && $user->getId() ) { # Use canonical name $userId = $user->getId(); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 9f4bc2947b..5cb07fc26e 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2550,6 +2550,7 @@ Please contact your Internet service provider or tech support and inform them of 'sorbsreason' => 'Your IP address is listed as an open proxy in the DNSBL used by {{SITENAME}}.', 'sorbs_create_account_reason' => 'Your IP address is listed as an open proxy in the DNSBL used by {{SITENAME}}. You cannot create an account', +'cant-block-while-blocked' => 'Error: You cannot block other users while you are blocked.', # Developer tools 'lockdb' => 'Lock database',