mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
fix for preferences
This commit is contained in:
parent
8ee04f6ca4
commit
124c09cf2d
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -69,8 +69,8 @@
|
||||
$pref = new preferences(intval($phpgw->db->f("account_id")));
|
||||
$phpgw->common->hook_single("add_def_pref", "admin");
|
||||
for ($i=1;$i<sizeof($apps) - 1;$i++) {
|
||||
if($apps[$i]<>"admin")
|
||||
$phpgw->common->hook_single("add_def_pref", $apps[$i]);
|
||||
if($apps[$i]<>"admin")
|
||||
$phpgw->common->hook_single("add_def_pref", $apps[$i]);
|
||||
}
|
||||
$pref->commit();
|
||||
|
||||
|
@ -43,14 +43,13 @@
|
||||
$phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'");
|
||||
$phpgw->db->next_record();
|
||||
$group_con = $phpgw->db->f("group_id");
|
||||
$after_apps = explode(":",$apps);
|
||||
for ($i=1;$i<=count($after_apps);$i++) {
|
||||
$new_apps[] = $after_apps[$i];
|
||||
}
|
||||
|
||||
$after_apps = explode(":",$apps);
|
||||
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();
|
||||
$phpgw->db->next_record();
|
||||
$user_groups = $phpgw->db->f("account_groups") . ",$group_con:0,";
|
||||
|
||||
$user_groups = ereg_replace(",,",",",$user_groups);
|
||||
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user