fix for preferences

This commit is contained in:
skeeter 2001-01-10 05:01:56 +00:00
parent 8ee04f6ca4
commit 124c09cf2d
4 changed files with 16 additions and 17 deletions

View File

@ -93,15 +93,15 @@
$t = $pref->get_preferences();
$docommit = False;
while(list($key,$value) = each($phpgw_info["user"]["app_perms"])) {
if($value=="admin") {
$after_apps = explode(':',$apps_after);
for($i=1;$i<count($after_apps) - 1;$i++) {
if($after_apps[$i]=="admin") {
$check = "common";
} else {
$check = $value;
$check = $after_apps[$i];
}
if (!count($t["$check"])) {
$phpgw->common->hook_single("add_def_pref", $value);
if (!$t["$check"]) {
$phpgw->common->hook_single("add_def_pref", $after_apps[$i]);
$docommit = True;
}
}

View File

@ -66,12 +66,12 @@
$t = $pref->get_preferences();
$docommit = False;
for ($j=1;$j<=count($apps_after);$j++) {
for ($j=1;$j<count($apps_after) - 1;$j++) {
if($apps_after[$j]=="admin")
$check = "common";
else
$check = $apps_after[$j];
if (!count($t["$check"])) {
if (!$t["$check"]) {
$phpgw->common->hook_single("add_def_pref", $apps_after[$j]);
$docommit = True;
}

View File

@ -44,10 +44,9 @@
$phpgw->db->next_record();
$group_con = $phpgw->db->f("group_id");
$after_apps = explode(":",$apps);
for ($i=1;$i<=count($after_apps);$i++) {
for ($i=1;$i<count($after_apps) - 1;$i++) {
$new_apps[] = $after_apps[$i];
}
for ($i=0; $i<count($n_users);$i++) {
$phpgw->db->query("SELECT account_groups FROM accounts WHERE account_id=".$n_users[$i]);
$phpgw->db->next_record();
@ -65,7 +64,7 @@
$check = "common";
else
$check = $new_apps[$j];
if (!count($t["$check"])) {
if (!$t["$check"]) {
$phpgw->common->hook_single("add_def_pref", $new_apps[$j]);
$docommit = True;
}