- Timestamp:
- 03/29/10 14:46:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/inc/class.bo_userinterface.inc.php
r2085 r2372 10 10 \**************************************************************************/ 11 11 12 require_once('class.so_userinterface.inc.php');13 12 require_once('class.bo_ajaxinterface.inc.php'); 14 require_once('class.Paging.inc.php'); 15 16 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'GUI' . SEP . 'GUI.php'); 17 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'ActivityManager.php'); 13 18 14 /** 19 15 * @package Workflow … … 43 39 function bo_userinterface() 44 40 { 45 parent::bo_ajaxinterface(); 46 $this->so = new so_userinterface();47 $GLOBALS['ajax']->gui = new GUI($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID);41 parent::bo_ajaxinterface(); 42 $this->so = &Factory::getInstance('so_userinterface'); 43 $GLOBALS['ajax']->gui = &Factory::newInstance('GUI'); 48 44 } 49 45 … … 68 64 $webserver_url = $_SESSION['phpgw_info']['workflow']['server']['webserver_url']; 69 65 70 $templateServer = &$GLOBALS['workflow']['factory']->getInstance('TemplateServer');66 $templateServer =& Factory::getInstance('TemplateServer'); 71 67 foreach ($result['data'] as $line) 72 68 { … … 120 116 $pid = $params['pid']; 121 117 $result = array(); 122 123 $process = new Process($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID);118 119 $process = &Factory::newInstance('Process'); 124 120 $process->getProcess($pid); 125 121 $result['wf_procname'] = $process->name; 126 122 $result['wf_version'] = $process->version; 127 123 $result['wf_description'] = $process->description; 128 129 $activ_manager = new ActivityManager($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID);124 125 $activ_manager = &Factory::newInstance('ActivityManager'); 130 126 $result['wf_activities'] = $activ_manager->get_process_activities($pid); 131 132 $this->disconnect_all(); 133 134 return $result; 127 128 $this->disconnect_all(); 129 130 return $result; 135 131 } 136 132 … … 148 144 $itemsPerPage = isset($preferences['ui_items_per_page']) ? $preferences['ui_items_per_page'] : 15; 149 145 $lightVersion = ((isset($preferences['use_light_interface']) ? $preferences['use_light_interface'] : 0) == 1); 150 $paging = new Paging($itemsPerPage, $_POST);146 $paging = Factory::newInstance('Paging', $itemsPerPage, $_POST); 151 147 152 148 /* define the sorting */ … … 263 259 else 264 260 if ($row['wf_user'] != '') 265 $row['wf_user_fullname'] = $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($row['wf_user']);261 $row['wf_user_fullname'] = Factory::getInstance('WorkflowLDAP')->getName($row['wf_user']); 266 262 267 263 /* unset unneeded information */ … … 495 491 } 496 492 497 $instance = new Instance($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID);493 $instance = &Factory::newInstance('Instance'); 498 494 $instance->getInstance($instanceID); 499 495 500 $process = new Process($GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID);496 $process = &Factory::newInstance('Process'); 501 497 $process->getProcess($instance->pId); 502 498 … … 508 504 'wf_instance_id' => $instance->instanceId, 509 505 'wf_priority' => $instance->priority, 510 'wf_owner' => $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($instance->owner),506 'wf_owner' => Factory::getInstance('WorkflowLDAP')->getName($instance->owner), 511 507 'wf_next_activity' => $instance->nextActivity, 512 'wf_next_user' => $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP')->getName($instance->nextUser),508 'wf_next_user' => Factory::getInstance('WorkflowLDAP')->getName($instance->nextUser), 513 509 'wf_name' => $instance->name, 514 510 'wf_category' => $instance->category, … … 526 522 $result['wf_ended'] = ""; 527 523 528 $ldap = & $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP');524 $ldap = &Factory::getInstance('WorkflowLDAP'); 529 525 foreach ($instance->workitems as $line) 530 526 { … … 657 653 $cod_process = array(); 658 654 659 $ldap = & $GLOBALS['workflow']['factory']->getInstance('WorkflowLDAP');655 $ldap = &Factory::getInstance('WorkflowLDAP'); 660 656 $viewActivitiesID = array(); 661 657 foreach ($result['data'] as $row) … … 726 722 /* paginate the result */ 727 723 $itemsPerPage = isset($_SESSION['phpgw_info']['workflow']['user']['preferences']['ui_items_per_page']) ? $_SESSION['phpgw_info']['workflow']['user']['preferences']['ui_items_per_page'] : 15; 728 $paging = new Paging($itemsPerPage, $_POST);724 $paging = Factory::newInstance('Paging', $itemsPerPage, $_POST); 729 725 $output['instances'] = $paging->restrictItems($output['instances']); 730 726 $output['paging_links'] = $paging->commonLinks(); … … 740 736 /** 741 737 * Aplicacoes externas do usuario 742 * @return array 738 * @return array 743 739 * @access public 744 740 */ … … 746 742 { 747 743 $webserver_url = $_SESSION['phpgw_info']['workflow']['server']['webserver_url']; 748 $templateServer = & $GLOBALS['workflow']['factory']->getInstance('TemplateServer');744 $templateServer = &Factory::getInstance('TemplateServer'); 749 745 750 746 /* load the sites that the user can access */ … … 1070 1066 function callVoipConnect($params) 1071 1067 { 1072 $cachedLDAP = $GLOBALS['workflow']['factory']->newInstance('CachedLDAP');1068 $cachedLDAP = Factory::newInstance('CachedLDAP'); 1073 1069 $cachedLDAP->setOperationMode($cachedLDAP->OPERATION_MODE_LDAP); 1074 1070
Note: See TracChangeset
for help on using the changeset viewer.