r99198 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99197‎ | r99198 | r99199 >
Date:05:47, 7 October 2011
Author:aaron
Status:ok
Tags:
Comment:
MFT r99196 - Fixed 0.0.0.0 default for IP
Modified paths:
  • /branches/wmf/1.18wmf1/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/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 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99196Fixed 0.0.0.0 default for IPaaron05:38, 7 October 2011

Status & tagging log