From: Geoffrey Mon Date: Sun, 13 Sep 2015 22:52:33 +0000 (+0000) Subject: Enable multiple default values for XmlSelect X-Git-Tag: 1.31.0-rc.0~10024^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=e36845aac66286ad9912d5d44ee7d226e7c4f616 Enable multiple default values for XmlSelect Useful for when a 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"; } }