fix for group box in calendar

This commit is contained in:
skeeter 2001-01-21 14:30:53 +00:00
parent e82a7bebc8
commit 2f10a6cc28
2 changed files with 10 additions and 4 deletions

View File

@ -207,12 +207,18 @@
{
global $phpgw;
if(!$name) $name = "n_groups[]";
if(!$name) $name = "n_groups[]";
$out = '<select name="' . $name . '" multiple>';
while (list($null,$group) = each($groups)) {
$out .= '<option value="' . $group[0] . '"';
if (ereg("," . $group[0] . ",", $selected))
{
if (strtolower(gettype($selected)) == strtolower("array")) {
for($i=0;$i<count($selected);$i++) {
if ($group[0] == $selected[$i]) {
$out .= " SELECTED";
break;
}
}
} elseif (ereg("," . $group[0] . ",", $selected)) {
$out .= " SELECTED";
}
$out .= ">" . $group[1] . "</option>\n";