Changeset 1293 for sandbox/workflow/2.0/inc/local/classes
- Timestamp:
- 08/07/09 16:06:07 (15 years ago)
- Location:
- sandbox/workflow/2.0/inc/local/classes
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/2.0/inc/local/classes/class.JobBase.php
r795 r1293 89 89 { 90 90 require_once 'common.inc.php'; 91 $GLOBALS['workflow']['factory']->getInstance('WorkflowMacro')->prepareEnvironment();91 Factory::getInstance('WorkflowMacro')->prepareEnvironment(); 92 92 $this->jobID = $jobID; 93 93 $this->processID = $processID; 94 94 $this->currentDate = $currentDate; 95 $this->jobManager = & $GLOBALS['workflow']['factory']->getInstance('WorkflowJobManager');95 $this->jobManager = &Factory::getInstance('WorkflowJobManager'); 96 96 $this->testMode = $testMode; 97 97 $this->maximumExecutionTime = $maximumExecutionTime; … … 148 148 final private function prepareEnvironment() 149 149 { 150 $GLOBALS['workflow']['factory']->getInstance('WorkflowMacro')->prepareProcessEnvironment($this->processID);150 Factory::getInstance('WorkflowMacro')->prepareProcessEnvironment($this->processID); 151 151 152 152 require_once PHPGW_SERVER_ROOT . '/workflow/inc/class.process_factory.inc.php'; -
sandbox/workflow/2.0/inc/local/classes/class.wf_engine.php
r795 r1293 291 291 /* build the SQL query */ 292 292 $query = "SELECT wf_activity_id, wf_name, wf_normalized_name, wf_type, wf_description FROM egw_wf_activities WHERE (wf_activity_id = ?) AND (wf_p_id = ?)"; 293 $db = & $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;293 $db = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 294 294 $resultSet = $db->query($query, array($activityID, $processID)); 295 295 … … 319 319 /* build the SQL query */ 320 320 $query = "SELECT wf_activity_id, wf_name, wf_normalized_name, wf_type, wf_description FROM egw_wf_activities WHERE (wf_name = ?) AND (wf_p_id = ?)"; 321 $db = & $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;321 $db = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 322 322 $resultSet = $db->query($query, array($activityName, $processID)); 323 323 -
sandbox/workflow/2.0/inc/local/classes/class.wf_instance.php
r795 r1293 92 92 { 93 93 /* load the DB */ 94 $this->db = & $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;94 $this->db = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 95 95 96 96 /* load the process ID from the runtime */ … … 420 420 /* load the required instance (for the required user) */ 421 421 require_once GALAXIA_LIBRARY . SEP . 'src' . SEP . 'GUI' . SEP . 'GUI.php'; 422 $GUI = new GUI( $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID);422 $GUI = new GUI(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID); 423 423 $userInstance = $GUI->gui_list_user_instances($userID, 0, -1, '', '', "(ga.wf_is_interactive = 'y') AND (gia.wf_activity_id = {$activityID}) AND (gia.wf_instance_id = {$instanceID})", false, $this->processID, true, false, true, false, false, false); 424 424 $userInstance = $userInstance['data']; -
sandbox/workflow/2.0/inc/local/classes/class.wf_ldap.php
r1067 r1293 41 41 function wf_ldap() 42 42 { 43 $tmpLDAP = &$GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP');43 $tmpLDAP =& Factory::getInstance('WorkflowLDAP'); 44 44 $this->user_context = $tmpLDAP->getUserContext(); 45 45 $this->group_context = $tmpLDAP->getGroupContext(); 46 46 47 $this->ds = &$GLOBALS['workflow']['workflowObjects']->getLDAP();47 $this->ds =& Factory::getInstance('WorkflowObjects')->getLDAP(); 48 48 49 49 $this->cachedLDAP = new wf_cached_ldap(); -
sandbox/workflow/2.0/inc/local/classes/class.wf_location.php
r795 r1293 36 36 function initialize() 37 37 { 38 $this->db = & $GLOBALS['workflow']['workflowObjects']->getDBExpresso()->Link_ID;38 $this->db = &Factory::getInstance('WorkflowObjects')->getDBExpresso()->Link_ID; 39 39 $this->db->setFetchMode(ADODB_FETCH_ASSOC); 40 40 $this->cityInfo = array(); -
sandbox/workflow/2.0/inc/local/classes/class.wf_orgchart.php
r1131 r1293 24 24 function wf_orgchart() 25 25 { 26 $this->db = & $GLOBALS['workflow']['workflowObjects']->getDBWorkflow()->Link_ID;26 $this->db = &Factory::getInstance('WorkflowObjects')->getDBWorkflow()->Link_ID; 27 27 $this->db->setFetchMode(ADODB_FETCH_ASSOC); 28 28 } -
sandbox/workflow/2.0/inc/local/classes/class.wf_role.php
r1048 r1293 57 57 $this->processID = (int) $GLOBALS['workflow']['job']['processID']; 58 58 59 $this->db = & $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;59 $this->db = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 60 60 $this->roleManager = CreateObject('workflow.workflow_rolemanager'); 61 61 $this->activityManager = CreateObject('workflow.workflow_activitymanager'); … … 186 186 $users = array((int) $users); 187 187 $roleID = $this->roleManager->get_role_id($this->processID, $roleName); 188 $ldap = & $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP');188 $ldap = &Factory::getInstance('WorkflowLDAP'); 189 189 foreach ($users as $user) 190 190 { … … 212 212 $users = $this->roleManager->list_mapped_users($this->processID, false, array('wf_role_name' => $roleName)); 213 213 214 $ldap = & $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP');214 $ldap = &Factory::getInstance('WorkflowLDAP'); 215 215 $output = array(); 216 216 foreach ($users as $id => $login) … … 367 367 368 368 /* get the roles */ 369 $userGroups = $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getUserGroups($userID);369 $userGroups = Factory::getInstance('WorkflowLDAP')->getUserGroups($userID); 370 370 $query = 'SELECT DISTINCT role.wf_role_id, role.wf_name, role.wf_description FROM egw_wf_roles role, egw_wf_user_roles user_role WHERE (user_role.wf_role_id = role.wf_role_id) AND (role.wf_p_id = ?) AND (role.wf_role_id = ANY (?))'; 371 371 $query .= ' AND (((user_role.wf_user = ?) AND (user_role.wf_account_type = ?))'; -
sandbox/workflow/2.0/inc/local/classes/class.wf_workitem.php
r795 r1293 29 29 public function wf_workitem() 30 30 { 31 $this->db = &$GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;31 $this->db =& Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 32 32 $this->processID = (int) $GLOBALS['workflow']['wf_runtime']->activity->getProcessId(); 33 33 }
Note: See TracChangeset
for help on using the changeset viewer.