
aaron at svn
Aug 17, 2008, 5:52 PM
Post #1 of 1
(113 views)
Permalink
|
|
SVN: [39565] trunk/extensions/CheckUser
|
|
Revision: 39565 Author: aaron Date: 2008-08-18 00:52:50 +0000 (Mon, 18 Aug 2008) Log Message: ----------- some form improvements Modified Paths: -------------- trunk/extensions/CheckUser/CheckUser.i18n.php trunk/extensions/CheckUser/CheckUser_body.php Modified: trunk/extensions/CheckUser/CheckUser.i18n.php =================================================================== --- trunk/extensions/CheckUser/CheckUser.i18n.php 2008-08-18 00:16:32 UTC (rev 39564) +++ trunk/extensions/CheckUser/CheckUser.i18n.php 2008-08-18 00:52:50 UTC (rev 39565) @@ -49,6 +49,8 @@ 'checkuser-massblock-commit' => 'Block selected users', 'checkuser-block-success' => '\'\'\'The {{PLURAL:$2|user|users}} $1 {{PLURAL:$2|is|are}} now blocked.\'\'\'', 'checkuser-block-failure' => '\'\'\'No users blocked.\'\'\'', + 'checkuser-block-limit' => 'Too many users selected.', + 'checkuser-block-noreason' => 'You must give a reason for the blocks.', 'checkuser-accounts' => '$1 new {{PLURAL:$1|account|accounts}}', 'checkuser-too-many' => 'Too many results, please narrow down the CIDR. Here are the IPs used (5000 max, sorted by address):', Modified: trunk/extensions/CheckUser/CheckUser_body.php =================================================================== --- trunk/extensions/CheckUser/CheckUser_body.php 2008-08-18 00:16:32 UTC (rev 39564) +++ trunk/extensions/CheckUser/CheckUser_body.php 2008-08-18 00:52:50 UTC (rev 39565) @@ -61,6 +61,7 @@ $user = $wgRequest->getText( 'user' ) ? $wgRequest->getText( 'user' ) : $wgRequest->getText( 'ip' ); $user = trim($user); $reason = $wgRequest->getText( 'reason' ); + $blockreason = $wgRequest->getText( 'blockreason' ); $checktype = $wgRequest->getVal( 'checktype' ); $period = $wgRequest->getInt( 'period' ); $users = $wgRequest->getArray( 'users' ); @@ -99,7 +100,7 @@ # Perform one of the various submit operations... if( $wgRequest->wasPosted() ) { if( $wgRequest->getVal('action') === 'block' ) { - $this->doMassUserBlock( $users, $reason, $tag ); + $this->doMassUserBlock( $users, $blockreason, $tag ); } else if( $checktype=='subuserips' ) { $this->doUserIPsRequest( $name, $reason, $period ); } else if( $xff && $checktype=='subipedits' ) { @@ -212,6 +213,12 @@ if( empty($users) || $wgUser->isBlocked(false) ) { $wgOut->addWikiText( wfMsgExt('checkuser-block-failure',array('parsemag')) ); return; + } else if( count($users) > $wgCheckUserMaxBlocks ) { + $wgOut->addWikiText( wfMsgExt('checkuser-block-limit',array('parsemag')) ); + return; + } else if( !$reason ) { + $wgOut->addWikiText( wfMsgExt('checkuser-block-noreason',array('parsemag')) ); + return; } $counter = $blockSize = 0; $safeUsers = array(); @@ -849,7 +856,7 @@ $s .= "<p>" . Xml::checkLabel( wfMsgHtml( "checkuser-blocktag" ), 'usetag', 'usetag') . ' '; $s .= Xml::input( 'tag', 46, $tag, array( 'maxlength' => '150', 'id' => 'blocktag' ) ) . "</p>\n"; $s .= "<p>" . wfMsgHtml( "checkuser-reason" ) . ' '; - $s .= Xml::input( 'reason', 46, $reason, array( 'maxlength' => '150', 'id' => 'blockreason' ) ); + $s .= Xml::input( 'blockreason', 46, '', array( 'maxlength' => '150', 'id' => 'blockreason' ) ); $s .= ' ' . Xml::submitButton( wfMsgHtml('checkuser-massblock-commit'), array('id' => 'checkuserblocksubmit','name' => 'checkuserblock') ) . "</p>\n"; $s .= "</fieldset>\n"; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|