r100049 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100048‎ | r100049 | r100050 >
Date:16:16, 17 October 2011
Author:happy-melon
Status:ok
Tags:
Comment:
(bug 31405) block reason preload. Patch by Brad Jorsch.
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLForm.php
@@ -1706,7 +1706,17 @@
17071707
17081708 } else {
17091709 $final = $this->getDefault();
1710 - $list = $text = '';
 1710+
 1711+ $list = 'other';
 1712+ $text = $final;
 1713+ foreach ( $this->mFlatOptions as $option ) {
 1714+ $match = $option . wfMsgForContent( 'colon-separator' );
 1715+ if( strpos( $text, $match ) === 0 ) {
 1716+ $list = $option;
 1717+ $text = substr( $text, strlen( $match ) );
 1718+ break;
 1719+ }
 1720+ }
17111721 }
17121722 return array( $final, $list, $text );
17131723 }

Status & tagging log