mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:18:54 +01:00
fix for preferences
This commit is contained in:
parent
8ee04f6ca4
commit
124c09cf2d
@ -93,15 +93,15 @@
|
|||||||
$t = $pref->get_preferences();
|
$t = $pref->get_preferences();
|
||||||
|
|
||||||
$docommit = False;
|
$docommit = False;
|
||||||
|
$after_apps = explode(':',$apps_after);
|
||||||
while(list($key,$value) = each($phpgw_info["user"]["app_perms"])) {
|
for($i=1;$i<count($after_apps) - 1;$i++) {
|
||||||
if($value=="admin") {
|
if($after_apps[$i]=="admin") {
|
||||||
$check = "common";
|
$check = "common";
|
||||||
} else {
|
} else {
|
||||||
$check = $value;
|
$check = $after_apps[$i];
|
||||||
}
|
}
|
||||||
if (!count($t["$check"])) {
|
if (!$t["$check"]) {
|
||||||
$phpgw->common->hook_single("add_def_pref", $value);
|
$phpgw->common->hook_single("add_def_pref", $after_apps[$i]);
|
||||||
$docommit = True;
|
$docommit = True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,12 +66,12 @@
|
|||||||
$t = $pref->get_preferences();
|
$t = $pref->get_preferences();
|
||||||
|
|
||||||
$docommit = False;
|
$docommit = False;
|
||||||
for ($j=1;$j<=count($apps_after);$j++) {
|
for ($j=1;$j<count($apps_after) - 1;$j++) {
|
||||||
if($apps_after[$j]=="admin")
|
if($apps_after[$j]=="admin")
|
||||||
$check = "common";
|
$check = "common";
|
||||||
else
|
else
|
||||||
$check = $apps_after[$j];
|
$check = $apps_after[$j];
|
||||||
if (!count($t["$check"])) {
|
if (!$t["$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;
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,8 @@
|
|||||||
$pref = new preferences(intval($phpgw->db->f("account_id")));
|
$pref = new preferences(intval($phpgw->db->f("account_id")));
|
||||||
$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++) {
|
||||||
if($apps[$i]<>"admin")
|
if($apps[$i]<>"admin")
|
||||||
$phpgw->common->hook_single("add_def_pref", $apps[$i]);
|
$phpgw->common->hook_single("add_def_pref", $apps[$i]);
|
||||||
}
|
}
|
||||||
$pref->commit();
|
$pref->commit();
|
||||||
|
|
||||||
|
@ -43,14 +43,13 @@
|
|||||||
$phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'");
|
$phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'");
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
$group_con = $phpgw->db->f("group_id");
|
$group_con = $phpgw->db->f("group_id");
|
||||||
$after_apps = explode(":",$apps);
|
$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];
|
$new_apps[] = $after_apps[$i];
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i=0; $i<count($n_users);$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->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 = $phpgw->db->f("account_groups") . ",$group_con:0,";
|
||||||
|
|
||||||
$user_groups = ereg_replace(",,",",",$user_groups);
|
$user_groups = ereg_replace(",,",",",$user_groups);
|
||||||
@ -65,7 +64,7 @@
|
|||||||
$check = "common";
|
$check = "common";
|
||||||
else
|
else
|
||||||
$check = $new_apps[$j];
|
$check = $new_apps[$j];
|
||||||
if (!count($t["$check"])) {
|
if (!$t["$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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user