On Thu, Jun 5, 2008 at 8:46 PM, brion@svn.wikimedia.org wrote:
Revision: 35960 Author: brion Date: 2008-06-06 00:46:56 +0000 (Fri, 06 Jun 2008)
Log Message:
Revert r35901 -- UI regressions (ipb_already_blocked appears to have changed format, spewing giant red HTML all over everything)
Modified Paths:
trunk/phase3/RELEASE-NOTES trunk/phase3/includes/SpecialBlockip.php trunk/phase3/languages/messages/MessagesEn.php
Modified: trunk/phase3/RELEASE-NOTES
--- trunk/phase3/RELEASE-NOTES 2008-06-05 23:59:42 UTC (rev 35959) +++ trunk/phase3/RELEASE-NOTES 2008-06-06 00:46:56 UTC (rev 35960) @@ -338,7 +338,6 @@
- (bug 14385) "Move subpages" option no longer tries to move to invalid titles
- (bug 14386) Fix subpage namespace oddity when moving a talk page
- (bug 11771) Signup form now not shown if in read-only mode.
-* (bug 10080) Users can now modify an existing block without unblocking first.
- (bug 12859) $wgRateLimitsExcludedGroups has been deprecated in favor of
$wgGroupPermissions[]['noratelimit'].
- (Bug 13828) Split parameter $1 of MediaWiki:Missingarticle into $1 (=title)
Modified: trunk/phase3/includes/SpecialBlockip.php
--- trunk/phase3/includes/SpecialBlockip.php 2008-06-05 23:59:42 UTC (rev 35959) +++ trunk/phase3/includes/SpecialBlockip.php 2008-06-06 00:46:56 UTC (rev 35960) @@ -47,32 +47,10 @@ # var $BlockEmail;
function IPBlockForm( $par ) {
global $wgRequest, $wgUser, $wgLang;
global $wgRequest, $wgUser; $this->BlockAddress = $wgRequest->getVal( 'wpBlockAddress', $wgRequest->getVal( 'ip', $par ) ); $this->BlockAddress = strtr( $this->BlockAddress, '_', ' ' );
$this->AlreadyBlocked = false;
if( $this->BlockAddress && !$wgRequest->wasPosted() ){
$this->mBlock = new Block();
if( $this->mBlock->load($this->BlockAddress) ) {
$this->AlreadyBlocked = true;
$this->BlockReason = wfMsgForContent( 'ipb_modifying_block' );
$this->BlockReasonList = $wgRequest->getText( 'wpBlockReasonList' );
$this->BlockExpiry = wfMsg('ipbotheroption');
$this->BlockOther = $wgLang->timeanddate( $this->mBlock->mExpiry );
$this->BlockAnonOnly = $wgRequest->getBool( 'wpAnonOnly', true );
$this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', true );
$this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', true );
$this->BlockEmail = $wgRequest->getBool( 'wpEmailBan', false );
$this->BlockEmail = $this->mBlock->mBlockEmail;
$this->BlockWatchUser = $wgRequest->getBool( 'wpWatchUser', false );
# Re-check user's rights to hide names, very serious, defaults to 0
$this->BlockHideName = ( $this->mBlock->mHideName && $wgUser->isAllowed( 'hideuser' ) ) ? 1 : 0;
return true;
}
}
$this->BlockReason = $wgRequest->getText( 'wpBlockReason' ); $this->BlockReasonList = $wgRequest->getText( 'wpBlockReasonList' ); $this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') );
@@ -133,10 +111,6 @@ wfMsgForContent( 'ipbreasonotherlist' ), '', 'wpBlockDropDown', 4 );
global $wgStylePath, $wgStyleVersion;
if( $this->AlreadyBlocked ) {
$wgOut->addHTML( Xml::element( 'p', array ( 'class' => 'error' ),
wfMsg( 'ipb_already_blocked', $this->BlockAddress ) ) );
} $wgOut->addHTML( Xml::tags( 'script', array( 'type' => 'text/javascript', 'src' => "$wgStylePath/common/block.js?$wgStyleVersion" ), '' ) . Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( "action=submit" ), 'id' => 'blockip' ) ) .
@@ -384,10 +358,7 @@ if (wfRunHooks('BlockIp', array(&$block, &$wgUser))) {
if ( !$block->insert() ) {
// Block already exists. Silently delete the existing block and insert it again
$oldblock = Block::newFromDB( $this->BlockAddress );
$oldblock->delete();
$block->insert();
return array('ipb_already_blocked', htmlspecialchars($this->BlockAddress)); } wfRunHooks('BlockIpComplete', array($block, $wgUser));
Modified: trunk/phase3/languages/messages/MessagesEn.php
--- trunk/phase3/languages/messages/MessagesEn.php 2008-06-05 23:59:42 UTC (rev 35959) +++ trunk/phase3/languages/messages/MessagesEn.php 2008-06-06 00:46:56 UTC (rev 35960) @@ -2360,9 +2360,7 @@ 'block-log-flags-noemail' => 'e-mail blocked', 'range_block_disabled' => 'The sysop ability to create range blocks is disabled.', 'ipb_expiry_invalid' => 'Expiry time invalid.', -'ipb_already_blocked' => 'Caution: "$1" is already blocked. -You can modify the block settings by using this form.', -'ipb_modifying_block' => 'Modifying existing block:', +'ipb_already_blocked' => '"$1" is already blocked', 'ipb_cant_unblock' => 'Error: Block ID $1 not found. It may have been unblocked already.', 'ipb_blocked_as_range' => 'Error: The IP $1 is not blocked directly and cannot be unblocked. It is, however, blocked as part of the range $2, which can be unblocked.',
MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
Yes, ipb_already_blocked was repurposed for use as the "This user has already been blocked, but you can modify if if you'd like" message. Is there a problem with it being reused, or it being spit out with class="error"?
-Chad
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Chad wrote:
Yes, ipb_already_blocked was repurposed for use as the "This user has already been blocked, but you can modify if if you'd like" message. Is there a problem with it being reused, or it being spit out with class="error"?
Giant wad of double-escaped HTML in huge-type red.
- -- brion vibber (brion @ wikimedia.org)
wikitech-l@lists.wikimedia.org