Changeset 1280 for trunk/preferences/inc/class.uiaclprefs2.inc.php
- Timestamp:
- 08/05/09 18:20:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/preferences/inc/class.uiaclprefs2.inc.php
r496 r1280 101 101 $to_remove = unserialize(urldecode($processed)); 102 102 103 for($i=0;$i<count($to_remove);$i++) 104 $this->acl->delete($GLOBALS['phpgw_info']['flags']['currentapp'],$to_remove[$i]); 105 103 /* User records */ 104 $user_variable = $_POST['u_'.$GLOBALS['phpgw_info']['flags']['currentapp']]; 106 105 /* Group records */ 107 106 $group_variable = $_POST['g_'.$GLOBALS['phpgw_info']['flags']['currentapp']]; 107 $keys_to_keep = array(); 108 if(!empty($user_variable)) { 109 foreach($user_variable as $key_user=>$value) { 110 $temp = explode("_",$key_user); 111 $keys_to_keep[(int)$temp[0]] = 1; 112 } 113 } 114 115 for($i=0;$i<count($to_remove);$i++) { 116 117 if(!array_key_exists((int)$to_remove[$i],$keys_to_keep)) { 118 $this->acl->persist_shared_groups($to_remove[$i]); 119 } 120 $this->acl->delete($GLOBALS['phpgw_info']['flags']['currentapp'],$to_remove[$i]); 121 } 122 123 /* Group records */ 124 //$group_variable = $_POST['g_'.$GLOBALS['phpgw_info']['flags']['currentapp']]; 108 125 109 126 if (!$group_variable) … … 120 137 if($is_group) 121 138 $rights &= ~PHPGW_ACL_PRIVATE; 139 if(array_key_exists($user_id,$keys_to_keep)) 140 if(($rights & 1) == 0) { 141 $this->acl->persist_shared_groups($user_id); 142 } 122 143 $this->acl->add($GLOBALS['phpgw_info']['flags']['currentapp'],$group_id,$rights); 123 144 } 124 145 125 146 /* User records */ 126 $user_variable = $_POST['u_'.$GLOBALS['phpgw_info']['flags']['currentapp']];147 //$user_variable = $_POST['u_'.$GLOBALS['phpgw_info']['flags']['currentapp']]; 127 148 128 149 if (!$user_variable)
Note: See TracChangeset
for help on using the changeset viewer.