Fix "$1 is already blocked" parameter-not-passed-to-message error
authorHappy-melon <happy-melon@users.mediawiki.org>
Tue, 22 Mar 2011 17:26:32 +0000 (17:26 +0000)
committerHappy-melon <happy-melon@users.mediawiki.org>
Tue, 22 Mar 2011 17:26:32 +0000 (17:26 +0000)
includes/specials/SpecialBlock.php

index 504efde..92658e0 100644 (file)
@@ -557,7 +557,7 @@ class SpecialBlock extends SpecialPage {
                if( !$status ) {
                        # Show form unless the user is already aware of this...
                        if( !$data['AlreadyBlocked'] ) {
-                               return array( array( 'ipb_already_blocked', $data['Target'] ) );
+                               return array( array( 'ipb_already_blocked', $block->getTarget() ) );
                        # Otherwise, try to update the block...
                        } else {
                                # This returns direct blocks before autoblocks/rangeblocks, since we should
@@ -565,7 +565,7 @@ class SpecialBlock extends SpecialPage {
                                $currentBlock = Block::newFromTarget( $target );
 
                                if( $block->equals( $currentBlock ) ) {
-                                       return array( 'ipb_already_blocked' );
+                                       return array( array( 'ipb_already_blocked', $block->getTarget() ) );
                                }
 
                                # If the name was hidden and the blocking user cannot hide