From 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sun, 8 Dec 2013 09:55:49 +0100 Subject: Update to MediaWiki 1.22.0 --- includes/specials/SpecialUnblock.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'includes/specials/SpecialUnblock.php') diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php index c4a53cf0..ca93b6d1 100644 --- a/includes/specials/SpecialUnblock.php +++ b/includes/specials/SpecialUnblock.php @@ -56,8 +56,8 @@ class SpecialUnblock extends SpecialPage { $form->setSubmitTextMsg( 'ipusubmit' ); $form->addPreText( $this->msg( 'unblockiptext' )->parseAsBlock() ); - if( $form->show() ) { - switch( $this->type ) { + if ( $form->show() ) { + switch ( $this->type ) { case Block::TYPE_USER: case Block::TYPE_IP: $out->addWikiMsg( 'unblocked', wfEscapeWikiText( $this->target ) ); @@ -92,21 +92,21 @@ class SpecialUnblock extends SpecialPage { ) ); - if( $this->block instanceof Block ) { + if ( $this->block instanceof Block ) { list( $target, $type ) = $this->block->getTargetAndType(); # Autoblocks are logged as "autoblock #123 because the IP was recently used by # User:Foo, and we've just got any block, auto or not, that applies to a target # the user has specified. Someone could be fishing to connect IPs to autoblocks, # so don't show any distinction between unblocked IPs and autoblocked IPs - if( $type == Block::TYPE_AUTO && $this->type == Block::TYPE_IP ) { + if ( $type == Block::TYPE_AUTO && $this->type == Block::TYPE_IP ) { $fields['Target']['default'] = $this->target; unset( $fields['Name'] ); } else { $fields['Target']['default'] = $target; $fields['Target']['type'] = 'hidden'; - switch( $type ) { + switch ( $type ) { case Block::TYPE_USER: case Block::TYPE_IP: $fields['Name']['default'] = Linker::link( @@ -138,6 +138,8 @@ class SpecialUnblock extends SpecialPage { /** * Submit callback for an HTMLForm object + * @param array $data + * @param HTMLForm $form * @return Array( Array(message key, parameters) */ public static function processUIUnblock( array $data, HTMLForm $form ) { @@ -157,7 +159,7 @@ class SpecialUnblock extends SpecialPage { $target = $data['Target']; $block = Block::newFromTarget( $data['Target'] ); - if( !$block instanceof Block ) { + if ( !$block instanceof Block ) { return array( array( 'ipb_cant_unblock', $target ) ); } @@ -172,14 +174,14 @@ class SpecialUnblock extends SpecialPage { # If the specified IP is a single address, and the block is a range block, don't # unblock the whole range. list( $target, $type ) = SpecialBlock::getTargetAndType( $target ); - if( $block->getType() == Block::TYPE_RANGE && $type == Block::TYPE_IP ) { + if ( $block->getType() == Block::TYPE_RANGE && $type == Block::TYPE_IP ) { $range = $block->getTarget(); return array( array( 'ipb_blocked_as_range', $target, $range ) ); } # If the name was hidden and the blocking user cannot hide # names, then don't allow any block removals... - if( !$performer->isAllowed( 'hideuser' ) && $block->mHideName ) { + if ( !$performer->isAllowed( 'hideuser' ) && $block->mHideName ) { return array( 'unblock-hideuser' ); } @@ -189,7 +191,7 @@ class SpecialUnblock extends SpecialPage { } # Unset _deleted fields as needed - if( $block->mHideName ) { + if ( $block->mHideName ) { # Something is deeply FUBAR if this is not a User object, but who knows? $id = $block->getTarget() instanceof User ? $block->getTarget()->getID() @@ -209,7 +211,7 @@ class SpecialUnblock extends SpecialPage { # Make log entry $log = new LogPage( 'block' ); - $log->addEntry( 'unblock', $page, $data['Reason'] ); + $log->addEntry( 'unblock', $page, $data['Reason'], array(), $performer ); return true; } -- cgit v1.2.3-54-g00ecf