- Timestamp:
- 03/19/10 17:22:08 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/inc/class.bo_monitors.inc.php
r2264 r2311 12 12 require_once('class.bo_ajaxinterface.inc.php'); 13 13 14 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'GUI' . SEP . 'GUI.php'); 15 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'ProcessManager.php'); 16 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'ActivityManager.php'); 17 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'InstanceManager.php'); 18 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'RoleManager.php'); 19 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessMonitor' . SEP . 'ProcessMonitor.php'); 20 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'API' . SEP . 'Instance.php'); 21 require_once('class.workflow_acl.inc.php'); 14 require_once('class.workflow_acl.inc.php'); /* can we remove this? */ 22 15 require_once('class.bo_adminaccess.inc.php'); 23 16 require_once('class.powergraphic.inc.php'); … … 134 127 { 135 128 parent::bo_ajaxinterface(); 136 $GLOBALS['ajax']->gui = new GUI(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);129 $GLOBALS['ajax']->gui = &Factory::newInstance('GUI'); 137 130 $this->userID = $_SESSION['phpgw_info']['workflow']['account_id']; 138 131 $this->isWorkflowAdmin = $GLOBALS['ajax']->acl->checkWorkflowAdmin($this->userID); 139 $this->processManager = new ProcessManager(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);140 $this->activityManager = new ActivityManager(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);141 $this->instanceManager = new InstanceManager(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);142 $this->roleManager = new RoleManager(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);143 $this->processMonitor = new ProcessMonitor(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);132 $this->processManager = &Factory::newInstance('ProcessManager'); 133 $this->activityManager = &Factory::newInstance('ActivityManager'); 134 $this->instanceManager = &Factory::newInstance('InstanceManager'); 135 $this->roleManager = &Factory::newInstance('RoleManager'); 136 $this->processMonitor = &Factory::newInstance('ProcessMonitor'); 144 137 } 145 138 … … 169 162 private function convertFiltersToSQL($filters) 170 163 { 171 require_once 'nano/JSON.php';172 164 173 165 /* desserializa os dados */ 174 $JSON = new Services_JSON();166 $JSON = &Factory::newInstance('Services_JSON'); 175 167 /* desserializa a array principal, depois desserializa cada elemento desta array e, por fim, converte os elementos (que estão em forma de objeto) para array associativa */ 176 168 $filters = array_map('get_object_vars', array_map(array($JSON, 'decode'), $JSON->decode($filters))); … … 648 640 if ($params['ns'] == 'aborted') 649 641 { 650 $realInstance = new Instance(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);642 $realInstance = &Factory::newInstance('Instance'); 651 643 $realInstance->getInstance($params['iid']); 652 644 if (!empty($realInstance->instanceId)) … … 684 676 685 677 /* use next user or * for the new instance */ 686 $realInstance = new Instance(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);678 $realInstance = &Factory::newInstance('Instance'); 687 679 $realInstance->getInstance($params['iid'], false, false); 688 680 $user = $realInstance->getNextUser($params['aid']); … … 751 743 752 744 $maximumDisplaySize = 100; 753 $instance = new Instance(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);745 $instance = &Factory::newInstance('Instance'); 754 746 $instance->getInstance($params['iid']); 755 747 … … 783 775 return "Você não tem permissão para executar este procedimento!"; 784 776 785 $instance = new Instance(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);777 $instance = &Factory::newInstance('Instance'); 786 778 $instance->getInstance($params['iid']); 787 779 $output = $params; … … 804 796 $maximumDisplaySize = 100; 805 797 806 $instance = new Instance(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);798 $instance = &Factory::newInstance('Instance'); 807 799 $instance->getInstance($params['iid']); 808 800 $instance->set($params['name'], $params['value']); … … 835 827 return "Você não tem permissão para executar este procedimento!"; 836 828 837 $instance = new Instance(Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);829 $instance = &Factory::newInstance('Instance'); 838 830 $instance->getInstance($params['iid']); 839 831 $instance->clear($params['name']); … … 858 850 $output = array(); 859 851 $urlPrefix = 'workflow/inc/class.powergraphic.inc.php?'; 860 $powergraphic = new powergraphic;852 $powergraphic = &Factory::getInstance('powergraphic'); 861 853 $powergraphic->graphic_1 = $params['pid']; 862 854 $powergraphic->skin = 1;
Note: See TracChangeset
for help on using the changeset viewer.