r56184 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56183‎ | r56184 | r56185 >
Date:15:53, 11 September 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 20556) Stub threshold's "other" <input> in Special:Preferences now has a correct type="text" parameter
* also fix a bug in the detection if the "other" value is passed in the predefined options, remember: 0 == 'other' returns true (thank you, PHP, really)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLForm.php
@@ -717,7 +717,7 @@
718718 static $jsAdded = false;
719719
720720 function __construct( $params ) {
721 - if( !in_array( 'other', $params['options'] ) ) {
 721+ if( !in_array( 'other', $params['options'], true ) ) {
722722 $params['options'][wfMsg( 'htmlform-selectorother-other' )] = 'other';
723723 }
724724
@@ -748,7 +748,7 @@
749749
750750 $select->setAttribute( 'class', 'mw-htmlform-select-or-other' );
751751
752 - $tbAttribs = array( 'id' => $this->mID . '-other' );
 752+ $tbAttribs = array( 'id' => $this->mID . '-other', 'size' => $this->getSize() );
753753 if( !empty( $this->mParams['disabled'] ) ) {
754754 $select->setAttribute( 'disabled', 'disabled' );
755755 $tbAttribs['disabled'] = 'disabled';
@@ -761,8 +761,8 @@
762762 }
763763
764764 $textbox = Html::input( $this->mName . '-other',
765 - $this->getSize(),
766 - $valInSelect ? 'text' : $value,
 765+ $valInSelect ? '' : $value,
 766+ 'text',
767767 $tbAttribs );
768768
769769 return "$select<br/>\n$textbox";
Index: trunk/phase3/RELEASE-NOTES
@@ -472,6 +472,8 @@
473473 * (bug 19531) addPortletLink() now wraps inserted labels in a <span> element to be
474474 compatible with the CSS for the Vector skin
475475 * (bug 20578) Wrong localized image metadata - duplicated string?
 476+* (bug 20556) Stub threshold's "other" <input> in Special:Preferences now has a
 477+ correct type="text" parameter
476478
477479 == API changes in 1.16 ==
478480

Follow-up revisions

RevisionCommit summaryAuthorDate
r56597Merge r56184, bugfix for preferences regression caused by new Html class with...werdna13:58, 18 September 2009

Status & tagging log