- Timestamp:
- 07/11/12 11:45:10 (12 years ago)
- Location:
- branches/2.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk merged eligible /sandbox/2.4.1-3 6237-6527
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/2.4/expressoAdmin1_2/inc/class.bosectors.inc.php
r6713 r6754 45 45 $sector_info = array(); 46 46 $sector_info['ou'] = $_POST['sector']; 47 $sector_info['objectClass'][] = 'top'; 48 $sector_info['objectClass'][] = 'organizationalUnit'; 49 $sector_info['objectClass'][] = 'phpgwQuotaControlled'; 50 /*Insere as informações sobre quota total por usuários e por gigabytes de espaço em disco 51 Se não vierem os dados, ele coloca 0 (Caso não exista controle de cota). 52 */ 53 $sector_info['diskQuota'] = isset($_POST['disk_quota']) ? (int)$_POST['disk_quota'] : 0; 54 $sector_info['usersQuota'] = isset($_POST['users_quota']) ? (int)$_POST['users_quota'] : 0; 55 47 $sector_info['objectClass'][] = 'top'; 48 $sector_info['objectClass'][] = 'organizationalUnit'; 49 $sector_info['objectClass'][] = 'phpgwQuotaControlled'; 50 /*Insere as informações sobre quota total por usuários e por gigabytes de espaço em disco 51 Se não vierem os dados, ele coloca 0 (Caso não exista controle de cota). 52 */ 53 $sector_info['diskQuota'] = isset($_POST['disk_quota']) ? (int)$_POST['disk_quota'] : 0; 54 $sector_info['usersQuota'] = isset($_POST['users_quota']) ? (int)$_POST['users_quota'] : 0; 56 55 57 56 $systemName = $GLOBALS['phpgw_info']['server']['system_name']; … … 111 110 $this->so->remove_attribute($sector_info[0]['dn'], $ldap_mod_del); 112 111 } 113 if(!in_array('phpgwQuotaControlled',$sector_info[0]['objectclass'] )) 114 { 115 $ldap_mod_add = array(); 116 $ldap_mod_add['objectClass'][] = 'phpgwQuotaControlled'; 117 $ldap_mod_add['diskQuota'] = isset($_POST['disk_quota']) ? (int)$_POST['disk_quota'] : 0; 118 $ldap_mod_add['usersQuota'] = isset($_POST['users_quota']) ? (int)$_POST['users_quota'] : 0; 119 120 $this->so->add_attribute($sector_info[0]['dn'], $ldap_mod_add); 112 113 if(!in_array('phpgwQuotaControlled',$sector_info[0]['objectclass'] )) 114 { 115 $ldap_mod_add = array(); 116 $ldap_mod_add['objectClass'][] = 'phpgwQuotaControlled'; 117 $ldap_mod_add['diskQuota'] = isset($_POST['disk_quota']) ? (int)$_POST['disk_quota'] : 0; 118 $ldap_mod_add['usersQuota'] = isset($_POST['users_quota']) ? (int)$_POST['users_quota'] : 0; 119 120 $this->so->add_attribute($sector_info[0]['dn'], $ldap_mod_add); 121 121 } 122 else 123 { 124 $ldap_mod_replace = array();125 if(isset($_POST['disk_quota'])) 126 $ldap_mod_replace['diskQuota'] = (int)$_POST['disk_quota'];127 128 if(isset($_POST['users_quota'])) 129 $ldap_mod_replace['usersQuota'] = (int)$_POST['users_quota'];130 131 if(count($ldap_mod_replace) > 0) 132 $this->so->replace_attribute($sector_info[0]['dn'], $ldap_mod_replace);133 122 else 123 { 124 $ldap_mod_replace = array(); 125 if(isset($_POST['disk_quota'])) 126 $ldap_mod_replace['diskQuota'] = (int)$_POST['disk_quota']; 127 128 if(isset($_POST['users_quota'])) 129 $ldap_mod_replace['usersQuota'] = (int)$_POST['users_quota']; 130 131 if(count($ldap_mod_replace) > 0) 132 $this->so->replace_attribute($sector_info[0]['dn'], $ldap_mod_replace); 133 } 134 134 // Volta para o ListSectors 135 135 ExecMethod('expressoAdmin1_2.uisectors.list_sectors');
Note: See TracChangeset
for help on using the changeset viewer.