- Timestamp:
- 03/12/10 10:59:32 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/inc/class.so_userinterface.inc.php
r2094 r2233 22 22 function so_userinterface() 23 23 { 24 $this->db = &$GLOBALS['workflow']['workflowObjects']->getDBWorkflow()->Link_ID;24 $this->db =& Factory::getInstance('WorkflowObjects')->getDBWorkflow()->Link_ID; 25 25 $this->db->SetFetchMode(ADODB_FETCH_ASSOC); 26 26 } … … 93 93 if (!empty($externalApplicationsID)) 94 94 { 95 $result = $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID->query("SELECT DISTINCT external_application_id, name, address, image, authentication, intranet_only FROM egw_wf_external_application WHERE (external_application_id IN (" . implode(', ', $externalApplicationsID) . ")) ORDER BY name");95 $result = Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID->query("SELECT DISTINCT external_application_id, name, address, image, authentication, intranet_only FROM egw_wf_external_application WHERE (external_application_id IN (" . implode(', ', $externalApplicationsID) . ")) ORDER BY name"); 96 96 $preOutput = $result->GetArray(-1); 97 97 … … 245 245 246 246 $employees = $result->GetArray(-1); 247 $cachedLDAP = $GLOBALS['workflow']['factory']->newInstance('CachedLDAP');247 $cachedLDAP = Factory::newInstance('CachedLDAP'); 248 248 $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL); 249 249 $categoriesCount = array(); … … 318 318 319 319 $employees = $result->GetArray(-1); 320 $cachedLDAP = $GLOBALS['workflow']['factory']->newInstance('CachedLDAP');320 $cachedLDAP = Factory::newInstance('CachedLDAP'); 321 321 $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_NORMAL); 322 322 for ($i = 0; $i < count($employees); $i++) … … 370 370 371 371 /* searching employees by name in the ldap server */ 372 $list = @ldap_search($ldap, $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getLDAPContext(), ('(&(cn=*' . $searchTerm . '*)(phpgwaccounttype=u))'), array('uidNumber', 'cn', 'telephoneNumber'));372 $list = @ldap_search($ldap, Factory::getInstance('WorkflowLDAP')->getLDAPContext(), ('(&(cn=*' . $searchTerm . '*)(phpgwaccounttype=u))'), array('uidNumber', 'cn', 'telephoneNumber')); 373 373 if ($list === false) 374 374 return false; … … 466 466 467 467 /* executing it */ 468 $list = @ldap_search($ldap, $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getLDAPContext(), $ldap_query, array('uidNumber', 'cn', 'telephoneNumber'));468 $list = @ldap_search($ldap, Factory::getInstance('WorkflowLDAP')->getLDAPContext(), $ldap_query, array('uidNumber', 'cn', 'telephoneNumber')); 469 469 $entries = ldap_get_entries($ldap, $list); 470 470 … … 475 475 476 476 /* we will need to search into database 'cache' for users deleted in ldap */ 477 $cachedLDAP = $GLOBALS[ 'workflow' ][ 'factory' ] ->newInstance( 'CachedLDAP' );477 $cachedLDAP = Factory::newInstance( 'CachedLDAP' ); 478 478 $cachedLDAP -> setOperationMode( $cachedLDAP -> OPERATION_MODE_DATABASE ); 479 479 … … 531 531 532 532 /* searching employees by telephoneNumber in the ldap server */ 533 $list = @ldap_search($ldap, $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getLDAPContext(), ('(&(telephoneNumber=*' . $searchTerm . '*)(phpgwaccounttype=u))'), array('uidNumber', 'cn', 'telephoneNumber'));533 $list = @ldap_search($ldap, Factory::getInstance('WorkflowLDAP')->getLDAPContext(), ('(&(telephoneNumber=*' . $searchTerm . '*)(phpgwaccounttype=u))'), array('uidNumber', 'cn', 'telephoneNumber')); 534 534 535 535 if (!$list) return false; … … 652 652 $result = $this -> db -> query( "SELECT a.sigla as area, a.titular_funcionario_id as titular, s.funcionario_id as substituto, s.data_inicio, s.data_fim FROM area a INNER JOIN substituicao s ON ((a.area_id = s.area_id) AND (CURRENT_DATE BETWEEN s.data_inicio AND s.data_fim)) WHERE (organizacao_id = ?) ORDER BY area", array( $organizationID ) ); 653 653 654 $cachedLDAP = $GLOBALS[ 'workflow' ][ 'factory' ] ->newInstance( 'CachedLDAP' );654 $cachedLDAP = Factory::newInstance( 'CachedLDAP' ); 655 655 $cachedLDAP -> setOperationMode( $cachedLDAP -> OPERATION_MODE_LDAP_DATABASE ); 656 656 … … 719 719 720 720 $employees = $result -> GetArray( -1 ); 721 $cachedLDAP = $GLOBALS[ 'workflow' ][ 'factory' ] ->newInstance( 'CachedLDAP' );721 $cachedLDAP = Factory::newInstance( 'CachedLDAP' ); 722 722 $cachedLDAP -> setOperationMode( $cachedLDAP -> OPERATION_MODE_NORMAL ); 723 723 … … 791 791 $employees = $result -> GetArray( -1 ); 792 792 793 $cachedLDAP = $GLOBALS[ 'workflow' ][ 'factory' ] ->newInstance( 'CachedLDAP' );793 $cachedLDAP = Factory::newInstance( 'CachedLDAP' ); 794 794 $cachedLDAP -> setOperationMode( $cachedLDAP -> OPERATION_MODE_NORMAL ); 795 795 … … 817 817 usort( $employees, create_function( '$a,$b', 'return strcasecmp($a[\'cn\'],$b[\'cn\']);' ) ); 818 818 819 $paging = $GLOBALS['workflow']['factory']->newInstance('Paging', 50, $_POST);819 $paging = Factory::newInstance('Paging', 50, $_POST); 820 820 $employees = $paging->restrictItems( $employees ); 821 821
Note: See TracChangeset
for help on using the changeset viewer.