X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXmlSelect.php;h=78f476452f80d3c6504206081475eefe2d56b0d8;hb=3989429df37e06194fc5b763e7f6349d36492462;hp=1cd04ae10e27e30f4feb0c0782bf18bf65046045;hpb=6b1a173f07f1a04188735f4688ce6335da14c3b7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/XmlSelect.php b/includes/XmlSelect.php index 1cd04ae10e..78f476452f 100644 --- a/includes/XmlSelect.php +++ b/includes/XmlSelect.php @@ -1,6 +1,6 @@ . + * Class for generating HTML elements + * Class for generating HTML probably has the multiple attribute, + // so we should check if each $value is in $default, rather than checking if + // $value is equal to $default. + $selected = is_array( $default ) ? in_array( $value, $default ) : $value === $default; + $data .= Xml::option( $label, $value, $selected ) . "\n"; } }