applied patch for setting preferences

This commit is contained in:
skeeter 2000-12-31 22:58:41 +00:00
parent 4089a9a2e2
commit 1ed4e92e1b

View File

@ -23,11 +23,15 @@
if (! count($ab_selected)) { if (! count($ab_selected)) {
$errors[$totalerrors++] = lang("You must select at least 1 column to display"); $errors[$totalerrors++] = lang("You must select at least 1 column to display");
} }
if (! $totalerrors) { if (! $totalerrors) {
while ($pref = each($ab_selected)) { while (list($pref[0]) = each($abc)) {
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $pref[1]); if ($ab_selected["$pref[0]"]) {
$phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
} else {
$phpgw->preferences->delete("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]);
}
} }
if ($mainscreen_showbirthdays) { if ($mainscreen_showbirthdays) {
$phpgw->preferences->change("addressbook","mainscreen_showbirthdays"); $phpgw->preferences->change("addressbook","mainscreen_showbirthdays");
} else { } else {
@ -62,7 +66,7 @@
$i++; $j++; $i++; $j++;
echo '<td><input type="checkbox" name="ab_selected[' . $col . ']" value="True"' echo '<td><input type="checkbox" name="ab_selected[' . $col . ']" value="True"'
. ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . $descr . ($phpgw_info["user"]["preferences"]["addressbook"][$col]?" checked":"") . '>' . lang($descr)
. '</option></td>'; . '</option></td>';
if ($i == 3) { if ($i == 3) {