(bug 15642) Remove ability for blocked sysops to block other users.
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 21 Sep 2008 13:16:00 +0000 (13:16 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 21 Sep 2008 13:16:00 +0000 (13:16 +0000)
RELEASE-NOTES
includes/specials/SpecialBlockip.php
languages/messages/MessagesEn.php

index 0b54027..e8f46df 100644 (file)
@@ -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 ===
 
index 2157f23..422d804 100644 (file)
@@ -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();
index 9f4bc29..5cb07fc 100644 (file)
@@ -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',