Changeset 32 for trunk/expressoAdmin1_2/inc/class.bosectors.inc.php
- Timestamp:
- 06/08/07 15:18:19 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.bosectors.inc.php
r2 r32 45 45 $sector_info['objectClass'][0] = 'top'; 46 46 $sector_info['objectClass'][1] = 'organizationalUnit'; 47 $sector_info['objectClass'][2] = 'phpgwAccount'; 48 49 if ($_POST['sector_visible']) 50 $sector_info['phpgwaccountvisible'] = '-1'; 47 51 48 52 // Chama funcao para escrever no OpenLDAP, case de erro, volta com msg de erro. … … 61 65 $GLOBALS['phpgw']->redirect($url); 62 66 } 63 67 64 68 function save_sector() 65 69 { 70 $sector_info = $this->so->get_info($_POST['context']); 71 72 if (($_POST['sector_visible'] == 'on') && ($sector_info['phpgwaccountvisible'] != '-1')) 73 { 74 foreach ($sector_info[0]['objectclass'] as $objectClass) 75 { 76 if ($objectClass == 'phpgwAccount') 77 $phpgwAccount = true; 78 else 79 $phpgwAccount = false; 80 } 81 82 if (!$phpgwAccount) 83 { 84 $ldap_mod_add['objectClass'][] = 'phpgwAccount'; 85 } 86 87 $ldap_mod_add['phpgwaccountvisible'] = '-1'; 88 $this->so->add_attribute($sector_info[0]['dn'], $ldap_mod_add); 89 } 90 else 91 { 92 $ldap_mod_del['phpgwaccountvisible'] = array(); 93 $this->so->remove_attribute($sector_info[0]['dn'], $ldap_mod_del); 94 } 95 66 96 // Volta para o ListSectors 67 $url = ($GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uisectors.list_sectors')); 68 $GLOBALS['phpgw']->redirect($url); 97 ExecMethod('expressoAdmin1_2.uisectors.list_sectors'); 69 98 } 70 99 71 100 function delete_sector() 72 101 {
Note: See TracChangeset
for help on using the changeset viewer.