Fixing bug 20524: Hideuser: Nicer error when trying to block hidden user without...
authorTobias <churchofemacs@users.mediawiki.org>
Mon, 5 Oct 2009 11:30:52 +0000 (11:30 +0000)
committerTobias <churchofemacs@users.mediawiki.org>
Mon, 5 Oct 2009 11:30:52 +0000 (11:30 +0000)
RELEASE-NOTES
includes/specials/SpecialBlockip.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 159736d..5f8200f 100644 (file)
@@ -540,6 +540,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 20885) Search box no longer suggests unavailable special pages
 * (bug 20948) "Create this page" on Special:Search is no longer displayed when
   searching for special pages
+* (bug 20524) Hideuser: Show nice error when trying to block hidden user without 
+  hideuser right
 
 == API changes in 1.16 ==
 
index 2d9ab1c..54b96fe 100644 (file)
@@ -454,7 +454,7 @@ class IPBlockForm {
                                        # If the name was hidden and the blocking user cannot hide
                                        # names, then don't allow any block changes...
                                        if( $currentBlock->mHideName && !$wgUser->isAllowed('hideuser') ) {
-                                               return array( 'hookaborted' );
+                                               return array( 'cant-see-hidden-user' );
                                        }
                                        $currentBlock->delete();
                                        $block->insert();
index 31fe0e0..3ac19e6 100644 (file)
@@ -3001,6 +3001,7 @@ Please contact your Internet service provider or tech support and inform them of
 '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'        => 'You cannot block other users while you are blocked.',
+'cant-see-hidden-user'            => 'The user you are trying to block has already been blocked and hidden. Since you do not have the hideuser right, you cannot see or edit the user\'s block.',
 
 # Developer tools
 'lockdb'              => 'Lock database',
index beb9dbc..1ffd79d 100644 (file)
@@ -2024,6 +2024,7 @@ $wgMessageStructure = array(
                'sorbsreason',
                'sorbs_create_account_reason',
                'cant-block-while-blocked',
+               'cant-see-hidden-user'
        ),
        'developertools' => array(
                'lockdb',