stops killing common preferences

This commit is contained in:
skeeter 2000-12-30 17:43:17 +00:00
parent b693138a0b
commit 6e715790bd
4 changed files with 17 additions and 4 deletions

View File

@ -99,7 +99,11 @@
$docommit = False; $docommit = False;
for ($j=0;$j<count($new_apps);$j++) { for ($j=0;$j<count($new_apps);$j++) {
if (! @$pref->preferences[$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]); $phpgw->common->hook_single("add_def_pref", $new_apps[$j]);
$docommit = True; $docommit = True;
} }

View File

@ -65,7 +65,11 @@
$pref = new preferences(intval($n_users[$i])); $pref = new preferences(intval($n_users[$i]));
$docommit = False; $docommit = False;
for ($j=1;$j<=count($apps_after);$j++) { 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]); $phpgw->common->hook_single("add_def_pref", $apps_after[$j]);
$docommit = True; $docommit = True;
} }

View File

@ -69,7 +69,8 @@
$pref = new preferences($n_loginid); $pref = new preferences($n_loginid);
$phpgw->common->hook_single("add_def_pref", "admin"); $phpgw->common->hook_single("add_def_pref", "admin");
for ($i=1;$i<sizeof($apps) - 1;$i++) { for ($i=1;$i<sizeof($apps) - 1;$i++) {
$phpgw->common->hook_single("add_def_pref", $apps[$i]); if($apps[$i]<>"admin")
$phpgw->common->hook_single("add_def_pref", $apps[$i]);
} }
$pref->commit(); $pref->commit();
Header("Location: " . $phpgw->link("accounts.php","cd=$cd")); Header("Location: " . $phpgw->link("accounts.php","cd=$cd"));

View File

@ -59,7 +59,11 @@
$pref = new preferences($n_users[$i]); $pref = new preferences($n_users[$i]);
$docommit = False; $docommit = False;
for ($j=0;$j<count($new_apps);$j++) { for ($j=0;$j<count($new_apps);$j++) {
if (!$pref->preferences[$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]); $phpgw->common->hook_single("add_def_pref", $new_apps[$j]);
$docommit = True; $docommit = True;
} }