X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FXmlSelect.php;h=78f476452f80d3c6504206081475eefe2d56b0d8;hb=440d21b0d9eed439507d1389a625a354d79cb17f;hp=1cd04ae10e27e30f4feb0c0782bf18bf65046045;hpb=5b74a93eff8d3ead5cb1c21ca38391ecb39a9575;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"; } }