Changeset 64 for trunk/expressoAdmin1_2/inc/class.bocomputers.inc.php
- Timestamp:
- 09/05/07 11:18:58 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.bocomputers.inc.php
r27 r64 19 19 20 20 var $so; 21 var $db_functions; 21 22 var $functions; 22 23 … … 25 26 $this->so = CreateObject('expressoAdmin1_2.socomputers'); 26 27 $this->functions = $this->so->functions; 28 $this->db_functions = CreateObject('expressoAdmin1_2.db_functions'); 27 29 } 28 30 29 31 function create_computer() 30 32 { 31 if (!$this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], ' add_groups'))33 if (!$this->functions->check_acl($_SESSION['phpgw_session']['session_lid'], 'create_computers')) 32 34 { 33 $_POST['error_messages'] = "O arquivo binário /home/expressolivre/mkntpwd não exite.";34 ExecMethod('expressoAdmin1_2.uiaccounts.add_computer');35 35 return false; 36 36 } … … 39 39 $c->read_repository(); 40 40 $current_config = $c->config_data; 41 // Leio o ID a ser usado na criação do objecto. 42 $next_id = ($this->db_functions->get_next_id('accounts')); 41 43 42 // Pega ID do BD e incrementa de 1. 43 $id = (($this->functions->get_next_id()) + 1); 44 if ((!is_numeric($next_id['id'])) || (!$next_id['status'])) 45 { 46 47 $return['status'] = false; 48 $return['msg'] = "Problemas obtendo ID do usuário.\n" . $id['msg']; 49 return $return; 50 } 51 else 52 { 53 $id = $next_id['id']; 54 } 55 // Incrementa o id no BD. 56 //$this->functions->increment_id($id,'accounts'); 44 57 45 58 // Cria array para incluir no LDAP … … 83 96 return false; 84 97 } 85 86 // Incrementa o id no BD.87 $this->functions->increment_id($id,'accounts');88 98 89 99 // Volta para o ListGroups … … 163 173 function delete_computer() 164 174 { 165 //_debug_array($_POST);166 167 175 //Delete from ldap. 168 176 if (!$this->so->delete_computer_ldap($_POST['computer_dn']))
Note: See TracChangeset
for help on using the changeset viewer.