mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
using array internaly instead of commasep. string
This commit is contained in:
parent
d834017cff
commit
1b5427cb5a
@ -150,7 +150,7 @@ class html
|
||||
}
|
||||
if ((int)$multiple > 0)
|
||||
{
|
||||
$options .= ' multiple size="'.(int)$multiple.'"';
|
||||
$options .= ' multiple="1" size="'.(int)$multiple.'"';
|
||||
if (substr($name,-2) != '[]')
|
||||
{
|
||||
$name .= '[]';
|
||||
@ -158,15 +158,15 @@ class html
|
||||
}
|
||||
$out = "<select name=\"$name\" $options>\n";
|
||||
|
||||
if (is_array($key))
|
||||
if (!is_array($key))
|
||||
{
|
||||
$key = implode(',',$key);
|
||||
$key = explode(',',$key);
|
||||
}
|
||||
foreach($arr as $k => $text)
|
||||
{
|
||||
$out .= '<option value="'.$this->htmlspecialchars($k).'"';
|
||||
|
||||
if("$k" == "$key" || strstr(",$key,",",$k,"))
|
||||
if(in_array($k,$key))
|
||||
{
|
||||
$out .= ' selected="1"';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user