mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
hopefully last attempt to get correct handling of '0', 0 and '' (first should be treated equal, last not)
This commit is contained in:
parent
746d48d5af
commit
515e84b96c
@ -412,7 +412,7 @@ class html
|
|||||||
$selected = $not_selected = array();
|
$selected = $not_selected = array();
|
||||||
foreach($arr as $val => $label)
|
foreach($arr as $val => $label)
|
||||||
{
|
{
|
||||||
if (in_array($val,$key,!$val))
|
if (in_array((string)$val,$key))
|
||||||
{
|
{
|
||||||
$selected[$val] = $label;
|
$selected[$val] = $label;
|
||||||
}
|
}
|
||||||
@ -439,7 +439,7 @@ class html
|
|||||||
|
|
||||||
if (strlen($label) > $max_len) $max_len = strlen($label);
|
if (strlen($label) > $max_len) $max_len = strlen($label);
|
||||||
|
|
||||||
$html .= self::label(self::checkbox($name,in_array($val,$key,!$val),$val,$options_no_id.
|
$html .= self::label(self::checkbox($name,in_array((string)$val,$key),$val,$options_no_id.
|
||||||
' id="'.$base_name.'['.$val.']'.'"').self::htmlspecialchars($label),
|
' id="'.$base_name.'['.$val.']'.'"').self::htmlspecialchars($label),
|
||||||
$base_name.'['.$val.']','',($title ? 'title="'.self::htmlspecialchars($title).'" ':''))."<br />\n";
|
$base_name.'['.$val.']','',($title ? 'title="'.self::htmlspecialchars($title).'" ':''))."<br />\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user