r49806 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49805‎ | r49806 | r49807 >
Date:08:58, 24 April 2009
Author:werdna
Status:ok
Tags:
Comment:
Update HTMLSelectOrOtherField to correctly work, since the code changes of having "nested" options and swapping keys and values
Modified paths:
  • /trunk/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLForm.php
@@ -591,7 +591,8 @@
592592
593593 $valInSelect = false;
594594 if ($value !== false)
595 - $valInSelect = array_key_exists( $value, $this->mParams['options'] );
 595+ $valInSelect = in_array( $value,
 596+ HTMLFormField::flattenOptions($this->mParams['options']) );
596597
597598 $selected = $valInSelect ? $value : 'other';
598599

Status & tagging log