Changeset 2292 for sandbox/workflow/branches
- Timestamp:
- 03/18/10 08:32:36 (14 years ago)
- Location:
- sandbox/workflow/branches/609/inc
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/inc/class.JobScheduler.inc.php
r2233 r2292 194 194 Factory::getInstance('WorkflowMacro')->prepareEnvironment(); 195 195 196 $job = new JobScheduler();196 $job = Factory::newInstance('JobScheduler'); 197 197 $job->run(); 198 198 } -
sandbox/workflow/branches/609/inc/class.bo_userinterface.inc.php
r2291 r2292 12 12 require_once('class.so_userinterface.inc.php'); 13 13 require_once('class.bo_ajaxinterface.inc.php'); 14 require_once('class.Paging.inc.php');15 14 16 15 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'GUI' . SEP . 'GUI.php'); … … 148 147 $itemsPerPage = isset($preferences['ui_items_per_page']) ? $preferences['ui_items_per_page'] : 15; 149 148 $lightVersion = ((isset($preferences['use_light_interface']) ? $preferences['use_light_interface'] : 0) == 1); 150 $paging = new Paging($itemsPerPage, $_POST);149 $paging = Factory::newInstance('Paging', $itemsPerPage, $_POST); 151 150 152 151 /* define the sorting */ … … 726 725 /* paginate the result */ 727 726 $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);727 $paging = Factory::newInstance('Paging', $itemsPerPage, $_POST); 729 728 $output['instances'] = $paging->restrictItems($output['instances']); 730 729 $output['paging_links'] = $paging->commonLinks(); -
sandbox/workflow/branches/609/inc/class.ui_adminsource.inc.php
r2233 r2292 17 17 */ 18 18 require_once dirname(__FILE__) . SEP . 'class.ui_ajaxinterface.inc.php'; 19 require_once dirname(__FILE__) . SEP . 'class.workflow_acl.inc.php';20 19 require_once 'engine' . SEP . 'config.ajax.inc.php'; 21 20 … … 43 42 function ui_adminsource() 44 43 { 45 $this->workflow_acl = new workflow_acl();44 $this->workflow_acl = Factory::getInstance('workflow_acl'); 46 45 $denyAccess = true; 47 46 if ($this->workflow_acl->checkWorkflowAdmin($_SESSION['phpgw_info']['workflow']['account_id'])) -
sandbox/workflow/branches/609/inc/class.ui_ajaxinterface.inc.php
r2233 r2292 11 11 \**************************************************************************/ 12 12 13 require_once 'class.workflow_acl.inc.php';14 13 require_once 'common.inc.php'; 15 14 require_once 'engine/class.ajax_config.inc.php'; … … 50 49 function set_wf_session() 51 50 { 52 $acl = new workflow_acl();51 $acl = Factory::getInstance('workflow_acl'); 53 52 $_SESSION['phpgw_info']['workflow']['server_root'] = PHPGW_SERVER_ROOT; 54 53 $_SESSION['phpgw_info']['workflow']['phpgw_api_inc'] = PHPGW_API_INC; -
sandbox/workflow/branches/609/inc/class.ui_monitors.inc.php
r2253 r2292 12 12 13 13 require_once(dirname(__FILE__) . SEP . 'class.ui_ajaxinterface.inc.php'); 14 require_once(dirname(__FILE__) . SEP . 'class.workflow_acl.inc.php');15 14 /** 16 15 * @package Workflow … … 37 36 { 38 37 $this->set_wf_session(); 39 $this->workflow_acl = new workflow_acl();38 $this->workflow_acl = Factory::getInstance('workflow_acl'); 40 39 41 40 if (!($this->workflow_acl->checkUserGroupAccessToType('MON', $_SESSION['phpgw_info']['workflow']['account_id']) || ($this->workflow_acl->checkWorkflowAdmin($_SESSION['phpgw_info']['workflow']['account_id'])))) -
sandbox/workflow/branches/609/inc/local/classes/class.wf_engine.php
r2253 r2292 90 90 function continueInstance($activityID, $instanceID) 91 91 { 92 require_once 'class.wf_instance.php'; 93 $WFInstance = new wf_instance(); 92 $WFInstance = &Factory::getInstance('wf_instance'); 94 93 return $WFInstance->continueInstance($activityID, $instanceID); 95 94 } … … 104 103 function abortInstance($instanceID) 105 104 { 106 require_once 'class.wf_instance.php'; 107 $WFInstance = new wf_instance(); 105 $WFInstance = &Factory::getInstance('wf_instance'); 108 106 return $WFInstance->abort($instanceID); 109 107 } … … 119 117 function setInstanceName($instanceID, $name) 120 118 { 121 require_once 'class.wf_instance.php'; 122 $WFInstance = new wf_instance(); 119 $WFInstance = &Factory::getInstance('wf_instance'); 123 120 return $WFInstance->setName($instanceID, $name); 124 121 } … … 134 131 function setInstancePriority($instanceID, $priority) 135 132 { 136 require_once 'class.wf_instance.php'; 137 $WFInstance = new wf_instance(); 133 $WFInstance = &Factory::getInstance('wf_instance'); 138 134 return $WFInstance->setPriority($instanceID, $priority); 139 135 } … … 149 145 function getIdleInstances($numberOfDays, $activities = null) 150 146 { 151 require_once 'class.wf_instance.php'; 152 $WFInstance = new wf_instance(); 147 $WFInstance = &Factory::getInstance('wf_instance'); 153 148 return $WFInstance->getIdle($numberOfDays, $activities); 154 149 } … … 175 170 function getInstancesByName($name) 176 171 { 177 require_once 'class.wf_instance.php'; 178 $WFInstance = new wf_instance(); 172 $WFInstance = &Factory::getInstance('wf_instance'); 179 173 $preOutput = $WFInstance->getByName($name); 180 174 $output = array(); … … 197 191 function getChildInstances($instanceID = null, $activityID = null) 198 192 { 199 require_once 'class.wf_instance.php'; 200 $WFInstance = new wf_instance(); 193 $WFInstance = Factory::getInstance('wf_instance'); 201 194 $preOutput = $WFInstance->getChildren($instanceID, $activityID); 202 195 $output = array(); … … 217 210 function getInstanceProperties($instanceID) 218 211 { 219 require_once 'class.wf_instance.php'; 220 $WFInstance = new wf_instance(); 212 $WFInstance = &Factory::getInstance('wf_instance'); 221 213 return $WFInstance->getProperties($instanceID); 222 214 } … … 231 223 function getChildInstanceProperties($instanceID) 232 224 { 233 require_once 'class.wf_instance.php'; 234 $WFInstance = new wf_instance(); 225 $WFInstance = &Factory::getInstance('wf_instance'); 235 226 return $WFInstance->getProperties($instanceID); 236 227 } … … 346 337 function getUserInstances($users, $activities = null, $status = null) 347 338 { 348 require_once 'class.wf_instance.php'; 349 $WFInstance = new wf_instance(); 339 $WFInstance = &Factory::getInstance('wf_instance'); 350 340 return $WFInstance->getByUser($users, $activities, $status); 351 341 } … … 360 350 function setInstanceProperty($instanceID, $nameProperty, $value) 361 351 { 362 require_once 'class.wf_instance.php'; 363 $WFInstance = new wf_instance(); 352 $WFInstance = &Factory::getInstance('wf_instance'); 364 353 return $WFInstance->setProperty($instanceID, $nameProperty, $value); 365 354 } … … 377 366 function checkUserAccessToInstance($userID, $instanceID, $activityID, $writeAccess = true) 378 367 { 379 require_once 'class.wf_instance.php'; 380 $WFInstance = new wf_instance(); 368 $WFInstance = &Factory::getInstance('wf_instance'); 381 369 return $WFInstance->checkUserAccess($userID, $instanceID, $activityID, $writeAccess); 382 370 } -
sandbox/workflow/branches/609/inc/local/classes/class.wf_instance.php
r2253 r2292 456 456 if ($userID !== '*') 457 457 { 458 require_once dirname(__FILE__) . '/class.wf_role.php'; 459 require_once dirname(__FILE__) . '/class.wf_engine.php'; 460 461 $wfRole = new wf_role(); 462 $engine = new wf_engine(); 458 $wfRole = Factory::getInstance('wf_role'); 459 $engine = Factory::getInstance('wf_engine'); 463 460 /* get information about the activity */ 464 461 if (($activityInfo = $engine->getActivityInformationByID($activityID)) === false) … … 529 526 530 527 /* try to get the role id */ 531 require_once dirname(__FILE__) . '/class.wf_role.php'; 532 $wfRole = new wf_role(); 528 $wfRole = Factory::getInstance('wf_role'); 533 529 if (($roleID = $wfRole->getRoleIdByName($roleName)) === false) 534 530 return false;
Note: See TracChangeset
for help on using the changeset viewer.