Index: trunk/phase3/includes/SpecialBlockip.php |
— | — | @@ -47,32 +47,10 @@ |
48 | 48 | # var $BlockEmail; |
49 | 49 | |
50 | 50 | function IPBlockForm( $par ) { |
51 | | - global $wgRequest, $wgUser, $wgLang; |
| 51 | + global $wgRequest, $wgUser; |
52 | 52 | |
53 | 53 | $this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip', $par ) ); |
54 | 54 | $this->BlockAddress = strtr( $this->BlockAddress, '_', ' ' ); |
55 | | - $this->AlreadyBlocked = false; |
56 | | - |
57 | | - if( $this->BlockAddress && !$wgRequest->wasPosted() ){ |
58 | | - $this->mBlock = new Block(); |
59 | | - if( $this->mBlock->load($this->BlockAddress) ) { |
60 | | - $this->AlreadyBlocked = true; |
61 | | - $this->BlockReason = wfMsgForContent( 'ipb_modifying_block' ); |
62 | | - $this->BlockReasonList = $wgRequest->getText( 'wpBlockReasonList' ); |
63 | | - $this->BlockExpiry = wfMsg('ipbotheroption'); |
64 | | - $this->BlockOther = $wgLang->timeanddate( $this->mBlock->mExpiry ); |
65 | | - $this->BlockAnonOnly = $wgRequest->getBool( 'wpAnonOnly', true ); |
66 | | - $this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', true ); |
67 | | - $this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', true ); |
68 | | - $this->BlockEmail = $wgRequest->getBool( 'wpEmailBan', false ); |
69 | | - $this->BlockEmail = $this->mBlock->mBlockEmail; |
70 | | - $this->BlockWatchUser = $wgRequest->getBool( 'wpWatchUser', false ); |
71 | | - # Re-check user's rights to hide names, very serious, defaults to 0 |
72 | | - $this->BlockHideName = ( $this->mBlock->mHideName && $wgUser->isAllowed( 'hideuser' ) ) ? 1 : 0; |
73 | | - return true; |
74 | | - } |
75 | | - } |
76 | | - |
77 | 55 | $this->BlockReason = $wgRequest->getText( 'wpBlockReason' ); |
78 | 56 | $this->BlockReasonList = $wgRequest->getText( 'wpBlockReasonList' ); |
79 | 57 | $this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') ); |
— | — | @@ -133,10 +111,6 @@ |
134 | 112 | wfMsgForContent( 'ipbreasonotherlist' ), '', 'wpBlockDropDown', 4 ); |
135 | 113 | |
136 | 114 | global $wgStylePath, $wgStyleVersion; |
137 | | - if( $this->AlreadyBlocked ) { |
138 | | - $wgOut->addHTML( Xml::element( 'p', array ( 'class' => 'error' ), |
139 | | - wfMsg( 'ipb_already_blocked', $this->BlockAddress ) ) ); |
140 | | - } |
141 | 115 | $wgOut->addHTML( |
142 | 116 | Xml::tags( 'script', array( 'type' => 'text/javascript', 'src' => "$wgStylePath/common/block.js?$wgStyleVersion" ), '' ) . |
143 | 117 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( "action=submit" ), 'id' => 'blockip' ) ) . |
— | — | @@ -384,10 +358,7 @@ |
385 | 359 | if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) { |
386 | 360 | |
387 | 361 | if ( !$block->insert() ) { |
388 | | - // Block already exists. Silently delete the existing block and insert it again |
389 | | - $oldblock = Block::newFromDB( $this->BlockAddress ); |
390 | | - $oldblock->delete(); |
391 | | - $block->insert(); |
| 362 | + return array('ipb_already_blocked', htmlspecialchars($this->BlockAddress)); |
392 | 363 | } |
393 | 364 | |
394 | 365 | wfRunHooks('BlockIpComplete', array($block, $wgUser)); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2360,9 +2360,7 @@ |
2361 | 2361 | 'block-log-flags-noemail' => 'e-mail blocked', |
2362 | 2362 | 'range_block_disabled' => 'The sysop ability to create range blocks is disabled.', |
2363 | 2363 | 'ipb_expiry_invalid' => 'Expiry time invalid.', |
2364 | | -'ipb_already_blocked' => 'Caution: "$1" is already blocked. |
2365 | | -You can modify the block settings by using this form.', |
2366 | | -'ipb_modifying_block' => 'Modifying existing block:', |
| 2364 | +'ipb_already_blocked' => '"$1" is already blocked', |
2367 | 2365 | 'ipb_cant_unblock' => 'Error: Block ID $1 not found. It may have been unblocked already.', |
2368 | 2366 | 'ipb_blocked_as_range' => 'Error: The IP $1 is not blocked directly and cannot be unblocked. |
2369 | 2367 | It is, however, blocked as part of the range $2, which can be unblocked.', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -338,7 +338,6 @@ |
339 | 339 | * (bug 14385) "Move subpages" option no longer tries to move to invalid titles |
340 | 340 | * (bug 14386) Fix subpage namespace oddity when moving a talk page |
341 | 341 | * (bug 11771) Signup form now not shown if in read-only mode. |
342 | | -* (bug 10080) Users can now modify an existing block without unblocking first. |
343 | 342 | * (bug 12859) $wgRateLimitsExcludedGroups has been deprecated in favor of |
344 | 343 | $wgGroupPermissions[]['noratelimit']. |
345 | 344 | * (Bug 13828) Split parameter $1 of MediaWiki:Missingarticle into $1 (=title) |