From 34b5e461ae15517469acfd15d186788f6e00f139 Mon Sep 17 00:00:00 2001 From: jengo Date: Sat, 19 Aug 2000 02:32:35 +0000 Subject: [PATCH] Fixed a problem with user not being added to the groups properly and the directorys wheren't being deleted --- admin/deletegroup.php | 4 ++-- admin/newgroup.php | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/admin/deletegroup.php b/admin/deletegroup.php index 97ce897b41..51e7147029 100755 --- a/admin/deletegroup.php +++ b/admin/deletegroup.php @@ -73,8 +73,8 @@ $sep = $phpgw->common->filesystem_sepeartor(); - $basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep . "users" - . $sep; + $basedir = $phpgw_info["server"]["server_root"] . $sep . "filemanager" . $sep + . "groups" . $sep; if (! @rmdir($basedir . $group_name)) { $cd = 38; diff --git a/admin/newgroup.php b/admin/newgroup.php index c3c56efebc..b5b8cb29c3 100755 --- a/admin/newgroup.php +++ b/admin/newgroup.php @@ -27,17 +27,20 @@ } if (! $error) { - $phpgw->db->lock(array("accounts","groups")); + //$phpgw->db->lock(array("accounts","groups")); $phpgw->db->query("INSERT INTO groups (group_name,group_apps) VALUES " . "('$n_group','" . $phpgw->groups->array_to_string("none",$n_group_permissions) . "') "); $phpgw->db->query("SELECT group_id FROM groups WHERE group_name='$n_group'"); - $groups_con = $phpgw->db->f("group_id"); + $phpgw->db->next_record(); + $group_con = $phpgw->db->f("group_id"); for ($i=0; $idb->query("SELECT groups FROM accounts WHERE con=".$n_users[$i]); + $phpgw->db->next_record(); $user_groups = $phpgw->db->f("groups") . ",$group_con,"; + $user_groups = ereg_replace(",,",",",$user_groups); $phpgw->db->query("UPDATE accounts SET groups='$user_groups' WHERE con=" . $n_users[$i]); @@ -52,7 +55,7 @@ if (! mkdir ($basedir . $n_group, 0707)) $cd = 37; - $phpgw->db->unlock(); + //$phpgw->db->unlock(); Header("Location: " . $phpgw->link("groups.php","cd=$cd")); exit;