| @@ 52-63 (lines=12) @@ | ||
| 49 | } |
|
| 50 | ||
| 51 | # bug 15810: blocked admins should have limited access here |
|
| 52 | if ( $user->isBlocked() ) { |
|
| 53 | $status = SpecialBlock::checkUnblockSelf( $params['user'], $user ); |
|
| 54 | if ( $status !== true ) { |
|
| 55 | $msg = $this->parseMsg( $status ); |
|
| 56 | $this->dieUsage( |
|
| 57 | $msg['info'], |
|
| 58 | $msg['code'], |
|
| 59 | 0, |
|
| 60 | [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ] |
|
| 61 | ); |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| 65 | $target = User::newFromName( $params['user'] ); |
|
| 66 | // Bug 38633 - if the target is a user (not an IP address), but it |
|
| @@ 53-64 (lines=12) @@ | ||
| 50 | $this->dieUsageMsg( 'cantunblock' ); |
|
| 51 | } |
|
| 52 | # bug 15810: blocked admins should have limited access here |
|
| 53 | if ( $user->isBlocked() ) { |
|
| 54 | $status = SpecialBlock::checkUnblockSelf( $params['user'], $user ); |
|
| 55 | if ( $status !== true ) { |
|
| 56 | $msg = $this->parseMsg( $status ); |
|
| 57 | $this->dieUsage( |
|
| 58 | $msg['info'], |
|
| 59 | $msg['code'], |
|
| 60 | 0, |
|
| 61 | [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ] |
|
| 62 | ); |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| 66 | // Check if user can add tags |
|
| 67 | if ( !is_null( $params['tags'] ) ) { |
|