Index: trunk/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -554,7 +554,8 @@ |
555 | 555 | # Give admins a heads-up before they go and block themselves. Much messier |
556 | 556 | # to do this for IPs, but it's pretty unlikely they'd ever get the 'block' |
557 | 557 | # permission anyway, although the code does allow for it |
558 | | - if( $target === $wgUser->getName() && ( $data['PreviousTarget'] != $data['Target'] || !$data['Confirm'] ) ) |
| 558 | + if( $target === $wgUser->getName() && |
| 559 | + ( $data['PreviousTarget'] != $data['Target'] || !$data['Confirm'] ) ) |
559 | 560 | { |
560 | 561 | return array( 'ipb-blockingself' ); |
561 | 562 | } |
— | — | @@ -634,7 +635,9 @@ |
635 | 636 | $status = $block->insert(); |
636 | 637 | if( !$status ) { |
637 | 638 | # Show form unless the user is already aware of this... |
638 | | - if( ( array_key_exists('PreviousTarget', $data ) && $data['PreviousTarget'] != htmlspecialchars( $block->getTarget() ) ) || !$data['Confirm'] ) { |
| 639 | + if( !$data['Confirm'] || ( array_key_exists( 'PreviousTarget', $data ) |
| 640 | + && $data['PreviousTarget'] !== htmlspecialchars( $block->getTarget() ) ) ) |
| 641 | + { |
639 | 642 | return array( array( 'ipb_already_blocked', $block->getTarget() ) ); |
640 | 643 | # Otherwise, try to update the block... |
641 | 644 | } else { |