r99196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99195‎ | r99196 | r99197 >
Date:05:38, 7 October 2011
Author:aaron
Status:ok
Tags:
Comment:
Fixed 0.0.0.0 default for IP
Modified paths:
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php
@@ -67,7 +67,10 @@
6868
6969 function loadParameters() {
7070 global $wgRequest;
71 - $this->mAddress = Block::normaliseRange( trim( $wgRequest->getText( 'address' ) ) );
 71+ $ip = trim( $wgRequest->getText( 'address' ) );
 72+ $this->mAddress = ( $ip !== '' || $wgRequest->wasPosted() )
 73+ ? Block::normaliseRange( $ip )
 74+ : '';
7275 $this->mReason = $wgRequest->getText( 'wpReason' );
7376 $this->mWhitelistStatus = $wgRequest->getCheck( 'wpWhitelistStatus' );
7477 $this->mEditToken = $wgRequest->getText( 'wpEditToken' );
@@ -150,6 +153,7 @@
151154
152155 $fields = array();
153156
 157+ // uses ipaddress msg
154158 $fields['ipaddress'] = Xml::input( 'address', 45, $this->mAddress );
155159 $fields['globalblocking-whitelist-reason'] = Xml::input( 'wpReason', 45, $this->mReason );
156160 $fields['globalblocking-whitelist-status'] = Xml::checkLabel( wfMsgExt( 'globalblocking-whitelist-statuslabel', 'parsemag' ), 'wpWhitelistStatus', 'wpWhitelistStatus', $this->mCurrentStatus );

Follow-up revisions

RevisionCommit summaryAuthorDate
r99198MFT r99196 - Fixed 0.0.0.0 default for IPaaron05:47, 7 October 2011

Status & tagging log