From 6e715790bd693b6aa545b0fd919a73c38b8f4b1d Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 30 Dec 2000 17:43:17 +0000 Subject: [PATCH] stops killing common preferences --- admin/editaccount.php | 6 +++++- admin/editgroup.php | 6 +++++- admin/newaccount.php | 3 ++- admin/newgroup.php | 6 +++++- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/admin/editaccount.php b/admin/editaccount.php index daacb6af62..25b77feda0 100755 --- a/admin/editaccount.php +++ b/admin/editaccount.php @@ -99,7 +99,11 @@ $docommit = False; for ($j=0;$jpreferences[$new_apps[$j]]) { + if($new_apps[$j]=="admin") + $check = "common"; + else + $check = $new_apps[$j]; + if (!$pref->preferences[$check]) { $phpgw->common->hook_single("add_def_pref", $new_apps[$j]); $docommit = True; } diff --git a/admin/editgroup.php b/admin/editgroup.php index f4ed616c09..bbdde36542 100755 --- a/admin/editgroup.php +++ b/admin/editgroup.php @@ -65,7 +65,11 @@ $pref = new preferences(intval($n_users[$i])); $docommit = False; for ($j=1;$j<=count($apps_after);$j++) { - if (!$pref->preferences[$apps_after[$j]]) { + if($apps_after[$j]=="admin") + $check = "common"; + else + $check = $apps_after[$j]; + if (!$pref->preferences[$check]) { $phpgw->common->hook_single("add_def_pref", $apps_after[$j]); $docommit = True; } diff --git a/admin/newaccount.php b/admin/newaccount.php index b8e9a39cf3..7a24bd4dac 100755 --- a/admin/newaccount.php +++ b/admin/newaccount.php @@ -69,7 +69,8 @@ $pref = new preferences($n_loginid); $phpgw->common->hook_single("add_def_pref", "admin"); for ($i=1;$icommon->hook_single("add_def_pref", $apps[$i]); + if($apps[$i]<>"admin") + $phpgw->common->hook_single("add_def_pref", $apps[$i]); } $pref->commit(); Header("Location: " . $phpgw->link("accounts.php","cd=$cd")); diff --git a/admin/newgroup.php b/admin/newgroup.php index 428e006f3a..02c48ef434 100755 --- a/admin/newgroup.php +++ b/admin/newgroup.php @@ -59,7 +59,11 @@ $pref = new preferences($n_users[$i]); $docommit = False; for ($j=0;$jpreferences[$new_apps[$j]]) { + if($new_apps[$j]=="admin") + $check = "common"; + else + $check = $new_apps[$j]; + if (!$pref->preferences[$check]) { $phpgw->common->hook_single("add_def_pref", $new_apps[$j]); $docommit = True; }