Changeset 9 for trunk/expressoAdmin1_2/inc/class.group.inc.php
- Timestamp:
- 03/29/07 14:23:18 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.group.inc.php
r2 r9 282 282 } 283 283 } 284 $add_apps = array_diff($new_values2, $old_values2); 285 $remove_apps = array_diff($old_values2, $new_values2); 284 285 $add_apps = array_flip(array_diff($new_values2, $old_values2)); 286 $remove_apps = array_flip(array_diff($old_values2, $new_values2)); 286 287 287 288 if (count($add_apps)>0) 288 289 { 289 $this->db_functions->add_id2apps($new_values['gidnumber'], array_flip($add_apps)); 290 } 290 $this->db_functions->add_id2apps($new_values['gidnumber'], $add_apps); 291 292 foreach ($add_apps as $app => $index) 293 $this->db_functions->write_log("Adicionado aplicativo $app ao grupo $dn",'',$dn,'',''); 294 } 295 291 296 if (count($remove_apps)>0) 292 297 { 293 $this->db_functions->remove_id2apps($new_values['gidnumber'], array_flip($remove_apps)); 298 //Verifica se o gerente tem acesso a aplicação antes de remove-la do usuario. 299 $manager_apps = $this->db_functions->get_apps($_SESSION['phpgw_session']['session_lid']); 300 301 foreach ($remove_apps as $app => $app_index) 302 { 303 if ($manager_apps[$app] == 'run') 304 $remove_apps2[$app] = $app_index; 305 } 306 $this->db_functions->remove_id2apps($new_values['gidnumber'], $remove_apps2); 307 308 foreach ($remove_apps2 as $app => $access) 309 $this->db_functions->write_log("Removido aplicativo $app do grupo $dn",'',$dn,'',''); 294 310 } 295 311 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.