https://bugzilla.wikimedia.org/show_bug.cgi?id=28313
Happy-melon <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Happy-melon <[email protected]> 2011-03-30 11:39:50 UTC --- To be clear, HTMLSelectField (and HTMLMultiSelectField etc) take options arrays of the form: array( 'message text' => 'value', 'other text' => other value, ); The reason the message texts are in the keys is so that grouped options using <optgroup> can be specified: array( 'message text' => 'value', 'other text' => other value, 'optgroup label' => array( 'label text' => 'a value', 'another label' => false, ), ); etc. There are two problems with attempting to flip keys and values: 1) It confuses the syntax for optgroups, as you cannot specify an array as a key, and there is also nowhere to put the message text 2) It means that the uniqueness must be in the array *value* rather than the key. While having identical keys is probably easier to get in practice, being able to specify multiple options as mapping to the same value is probably more *useful*. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
