Changeset 2440 for sandbox/workflow
- Timestamp:
- 04/07/10 11:02:26 (14 years ago)
- Location:
- sandbox/workflow/branches/609
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/inc/class.WorkflowMacro.inc.php
r2311 r2440 65 65 require_once PHPGW_SERVER_ROOT . '/workflow/inc/local/functions/local.functions.php'; 66 66 67 $runtime = &Factory::getInstance('WfRuntime' , Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID);67 $runtime = &Factory::getInstance('WfRuntime'); 68 68 $runtime->loadProcess($processID); 69 69 -
sandbox/workflow/branches/609/inc/class.run_activity.inc.php
r2355 r2440 168 168 var $agents = Array(); 169 169 170 /* CELEPAR */171 170 /** 172 171 * @var object $smarty holds a Smarty instance … … 194 193 */ 195 194 var $isChildInstance = false; 196 195 /** 196 * @var object Stores a 'workflow_smarty' object 197 * @access private 198 */ 197 199 private $workflowSmarty = null; 198 /* CELEPAR */ 200 199 201 /** 200 202 * Constructor … … 212 214 $this->runtime = &Factory::newInstance('workflow_wfruntime'); 213 215 $this->runtime->setDebug(_DEBUG); 214 //$this->base_activity = Factory::getInstance('workflow_baseactivity');215 //$this->process = Factory::getInstance('workflow_process');216 216 $this->GUI = &Factory::getInstance('workflow_gui'); 217 217 $this->categories = &Factory::getInstance('categories'); 218 218 219 219 $this->workflowSmarty = &Factory::getInstance('workflow_smarty', false); 220 220 221 // TODO: open a new connection to the database under a different username to allow privilege handling on tables 221 /* CELEPAR */222 222 unset($this->db); 223 223 } … … 335 335 $wf =& $GLOBALS['workflow']; 336 336 337 /* CELEPAR */338 337 /* path to the local functions developed by Celepar */ 339 338 $functions = PHPGW_SERVER_ROOT . SEP . 'workflow' . SEP . 'inc' . SEP . 'local' . SEP . 'functions' . SEP . 'local.functions.php'; … … 341 340 /* activate local functions */ 342 341 require_once($functions); 343 /* CELEPAR */344 342 345 343 //get configuration options with default values if no init was done before … … 401 399 $this->download_mode = get_var('download_mode', array('POST','GET'), false); 402 400 403 /* #celepar# smarty code*/404 405 401 $smarty = Factory::getInstance('process_smarty'); 406 402 … … 423 419 $smarty->assign('wf_back_link',$GLOBALS['workflow']['wf_back_link']); 424 420 $smarty->assign('wf_activity_url',$GLOBALS['workflow']['wf_activity_url']); 425 421 426 422 /* register the prefilter smarty plugin wf_default_template */ 427 423 $smarty->load_filter('pre', 'wf_default_template'); … … 444 440 $security =& Factory::newInstance('SecurityUtils'); //input sanitizer class 445 441 $env['request'] =& $security->process($_REQUEST); //sanitizes input data from client 446 //$env['factory'] =& new ProcessFactory(); //instantiation controller class447 442 $env['factory'] =& Factory::getInstance('ProcessWrapperFactory'); //instantiation controller class 448 443 $env['natural'] =& wf_create_object('wf_natural'); //data access object instance for mainframe … … 450 445 451 446 $GLOBALS['workflow_env'] = &$env; 452 //echo "<br><br><br><br><br>Including $source <br>In request: <pre>";print_r($_REQUEST);echo "</pre>"; 453 //[__leave_activity] is setted if needed in the xxx_pre code or by the user in his code 454 // HERE the user code is 'executed'. Note that we do not use include_once or require_once because 455 //it could the same code several times with automatic activities looping in the graph and it still 456 //need to be executed 447 448 /** 449 * [__leave_activity] is setted if needed in the xxx_pre code or by the user in his code 450 * HERE the user code is 'executed'. Note that we do not use include_once or require_once because 451 * it could the same code several times with automatic activities looping in the graph and it still 452 * need to be executed 453 */ 457 454 $_engineProcessCodeDirectory = GALAXIA_PROCESSES . SEP . $this->process->getNormalizedName(). SEP . 'code'; 458 455 $_engineCompilerDirectory = GALAXIA_LIBRARY . SEP . 'compiler'; … … 480 477 481 478 /** 482 * XXX 483 * here we are going to use our new Security static class. 479 * Here we are going to use our new Security static class. 484 480 * From now, the factory frontend (static) will forward 485 481 * the messages for the process factory instead of Workflow 486 482 * factory. 487 * XXX488 483 */ 489 484 Security::enable(); … … 688 683 unset($GLOBALS['workflow']['wf_instance_url']); 689 684 690 /* CELEPAR */691 685 /* activate local functions */ 692 686 require_once(PHPGW_SERVER_ROOT . SEP . 'workflow' . SEP . 'inc' . SEP . 'local' . SEP . 'functions' . SEP . 'local.functions.php'); 693 /* CELEPAR */694 687 695 688 //get configuration options with default values if no init was done before … … 716 709 $security =& Factory::newInstance('SecurityUtils'); //input sanitizer class 717 710 $env['request'] =& $security->process($_REQUEST); //sanitizes input data from client 718 //$env['factory'] =& new ProcessFactory(); //instantiation controller class719 711 $env['factory'] =& Factory::newInstance('ProcessWrapperFactory'); //instantiation controller class 720 712 $env['natural'] =& wf_create_object('wf_natural'); //data access object instance for mainframe … … 731 723 732 724 /** 733 * XXX734 725 * here we are going to use our new Security static class. 735 726 * From now, the factory frontend (static) will forward … … 737 728 * factory. Note that this is the same comment as the previous 738 729 * function... boooring.. =} 739 * XXX 740 */ 730 */ 741 731 Security::enable(); 742 732 -
sandbox/workflow/branches/609/inc/class.so_move_instances.inc.php
r2311 r2440 111 111 $where[] = 'wf_p_id IS NULL'; 112 112 } 113 $processManager = &Factory::getInstance('ProcessManager' , $this->db);113 $processManager = &Factory::getInstance('ProcessManager'); 114 114 115 115 /* workaround to sort the result using two columns */ -
sandbox/workflow/branches/609/inc/class.so_userinterface.inc.php
r2323 r2440 351 351 { 352 352 /* get ldap connection */ 353 $ldap = & $GLOBALS['workflow']['workflowObjects']->getLDAP();353 $ldap = &Factory::getInstance('WorkflowObjects')->getLDAP(); 354 354 355 355 $searchTermExploded = explode(" ", $searchTerm); … … 431 431 { 432 432 /* get ldap connection */ 433 $ldap = & $GLOBALS['workflow']['workflowObjects']->getLDAP();433 $ldap = &Factory::getInstance('WorkflowObjects')->getLDAP(); 434 434 435 435 /* makes no sense search for an area if the string has more than one word */ … … 527 527 528 528 /* get ldap connection */ 529 $ldap = & $GLOBALS['workflow']['workflowObjects']->getLDAP();529 $ldap = &Factory::getInstance('WorkflowObjects')->getLDAP(); 530 530 531 531 /* searching employees by telephoneNumber in the ldap server */ -
sandbox/workflow/branches/609/inc/class.ui_adminprocesses.inc.php
r2338 r2440 1 1 <?php 2 require_once 'common.inc.php';3 2 require_once(dirname(__FILE__) . SEP . 'class.bo_workflow_forms.inc.php'); 4 3 require_once('engine' . SEP . 'config.egw.inc.php'); -
sandbox/workflow/branches/609/inc/common.inc.php
r2338 r2440 70 70 require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php'; 71 71 require_once WF_LIB_ROOT . 'factory/ProcessFactory.php'; 72 73 $GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects');74 72 ?> -
sandbox/workflow/branches/609/inc/engine/src/API/Instance.php
r2311 r2440 1170 1170 1171 1171 //lock rows and ensure access is granted 1172 if (!(isset($this->security))) $this->security = &Factory::getInstance('WfSecurity' , $this->db);1172 if (!(isset($this->security))) $this->security = &Factory::getInstance('WfSecurity'); 1173 1173 if (!($this->security->checkUserAction($activityId,$this->instanceId,'complete'))) 1174 1174 { -
sandbox/workflow/branches/609/inc/engine/src/ProcessManager/ActivityManager.php
r2311 r2440 1195 1195 elseif ( (!($result=='*')) && $performAccessCheck) 1196 1196 { 1197 $wf_security = &Factory::getInstance('WfSecurity' , $this->db);1197 $wf_security = &Factory::getInstance('WfSecurity'); 1198 1198 // perform the check 1199 1199 if (!($wf_security->checkUserAccess($result,$activityId))) -
sandbox/workflow/branches/609/inc/local/classes/class.wf_engine.php
r2311 r2440 282 282 /* build the SQL query */ 283 283 $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 = ?)"; 284 $db = & $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;284 $db = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 285 285 $resultSet = $db->query($query, array($activityID, $processID)); 286 286 … … 310 310 /* build the SQL query */ 311 311 $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 = ?)"; 312 $db = & $GLOBALS['workflow']['workflowObjects']->getDBGalaxia()->Link_ID;312 $db = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 313 313 $resultSet = $db->query($query, array($activityName, $processID)); 314 314 -
sandbox/workflow/branches/609/inc/local/classes/class.wf_instance.php
r2311 r2440 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 */ -
sandbox/workflow/branches/609/inc/local/classes/class.wf_ldap.php
r2311 r2440 44 44 $this->group_context = $tmpLDAP->getGroupContext(); 45 45 46 $this->ds = & $GLOBALS['workflow']['workflowObjects']->getLDAP();46 $this->ds = &Factory::getInstance('WorkflowObjects')->getLDAP(); 47 47 48 48 $this->cachedLDAP = &Factory::getInstance('wf_cached_ldap'); -
sandbox/workflow/branches/609/inc/local/classes/class.wf_location.php
r2160 r2440 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/branches/609/inc/local/classes/class.wf_orgchart.php
r2056 r2440 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/branches/609/inc/local/classes/class.wf_role.php
r2253 r2440 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 = Factory::getInstance('workflow_rolemanager'); 61 61 $this->activityManager = Factory::getInstance('workflow_activitymanager'); -
sandbox/workflow/branches/609/inc/local/classes/class.wf_workitem.php
r795 r2440 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 } -
sandbox/workflow/branches/609/inc/natural/class.natural.php
r795 r2440 196 196 try 197 197 { 198 $str = new PosString(new NatType);198 $str = Factory::newInstance('PosString', Factory::newInstance('NatType')); 199 199 $this->strInputParameter = $str->mountString(array_merge($this->obj->input, $this->obj->output), $inputParams); 200 200 … … 409 409 if (!empty($this->resultSet)) 410 410 unset($this->resultSet); 411 $this->resultSet = new NaturalResultSet($result);411 $this->resultSet = &Factory::newInstance('NaturalResultSet', $result); 412 412 } 413 413 } -
sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php
r2338 r2440 134 134 $this->registerFileInfo('NanoSanitizer', 'NanoSanitizer.class.php', 'inc/nano'); 135 135 136 /* natural classes */ 137 $this->registerFileInfo('PosString', 'pos_string.php', 'inc/natural'); 138 $this->registerFileInfo('NatType', 'nat_types.php', 'inc/natural'); 139 $this->registerFileInfo('NaturalResultSet', 'class.natural_resultset.php', 'inc/natural'); 140 136 141 /* registering egw external classes */ 137 142 $this->registerFileInfo('db', 'class.db.inc.php', '', EGW_INC_ROOT);
Note: See TracChangeset
for help on using the changeset viewer.