* Disabled one query for now since index is still pending
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 21 Mar 2009 06:12:49 +0000 (06:12 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 21 Mar 2009 06:12:49 +0000 (06:12 +0000)
* Removed duplicate expiry check
* Tweaked editcount limit handling

includes/specials/SpecialBlockip.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 17d08af..3dbd091 100644 (file)
@@ -401,13 +401,12 @@ class IPBlockForm {
                        } else if( $expiry !== 'infinity' ) {
                                // Bad expiry.
                                return array('ipb_expiry_temp');
+                       } else if( User::edits($userId) > 3000 ) {
+                               // Typically, the user should have a handful of edits.
+                               // Disallow hiding users with many edits for performance.
+                               return array('ipb_hide_invalid');
                        }
                }
-               
-               if( $this->BlockHideName && $expiry != 'infinity' ) {
-                       // Bad expiry.
-                       return array('ipb_expiry_temp');
-               }
 
                # Create block
                # Note: for a user block, ipb_address is only for display purposes
@@ -499,11 +498,6 @@ class IPBlockForm {
        private function setUsernameBitfields( $name, $userId, $op ) {
                if( $op !== '|' && $op !== '&' )
                        return false; // sanity check
-               // Typically, the user should have a handful of edits.
-               // Disallow hiding users with many edits for performance.
-               if( User::edits($userId) > 3000 ) {
-                       return false;
-               }
                $dbw = wfGetDB( DB_MASTER );
                $delUser = Revision::DELETED_USER | Revision::DELETED_RESTRICTED;
                # To suppress, we OR the current bitfields with Revision::DELETED_USER
@@ -528,8 +522,9 @@ class IPBlockForm {
                $dbw->update( 'oldimage', array("oi_deleted = oi_deleted $op $delUser"),
                        array('oi_user_text' => $name), __METHOD__ );
                # Hide name from deleted images
-               $dbw->update( 'filearchive', array("fa_deleted = fa_deleted $op $delUser"),
-                       array('fa_user_text' => $name), __METHOD__ );
+               # WMF - schema change pending
+               # $dbw->update( 'filearchive', array("fa_deleted = fa_deleted $op $delUser"),
+               #       array('fa_user_text' => $name), __METHOD__ );
                # Done!
                return true;
        }
index 93bdb5d..3430439 100644 (file)
@@ -2692,6 +2692,7 @@ See the [[Special:IPBlockList|IP block list]] for the list of currently operatio
 'range_block_disabled'            => 'The administrator ability to create range blocks is disabled.',
 'ipb_expiry_invalid'              => 'Expiry time invalid.',
 'ipb_expiry_temp'                 => 'Hidden username blocks must be permanent.',
+'ipb_hide_invalid'                => 'Unable to suppress this account; it may have too many edits.',
 'ipb_already_blocked'             => '"$1" is already blocked',
 'ipb-needreblock'                 => '== Already blocked ==
 $1 is already blocked. Do you want to change the settings?',
index 1450e0b..fe07ca0 100644 (file)
@@ -1876,6 +1876,7 @@ $wgMessageStructure = array(
                'range_block_disabled',
                'ipb_expiry_invalid',
                'ipb_expiry_temp',
+               'ipb_hide_invalid',
                'ipb_already_blocked',
                'ipb-needreblock',
                'ipb_cant_unblock',