Changeset 2533
- Timestamp:
- 04/14/10 16:08:15 (14 years ago)
- Location:
- sandbox/workflow/branches/993
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/993/inc/class.WorkflowMacro.inc.php
r2492 r2533 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/993/inc/class.run_activity.inc.php
r2492 r2533 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 … … 405 403 $this->download_mode = get_var('download_mode', array('POST','GET'), false); 406 404 407 /* #celepar# smarty code*/408 409 405 $smarty = Factory::getInstance('process_smarty'); 410 406 … … 427 423 $smarty->assign('wf_back_link',$GLOBALS['workflow']['wf_back_link']); 428 424 $smarty->assign('wf_activity_url',$GLOBALS['workflow']['wf_activity_url']); 429 425 430 426 /* register the prefilter smarty plugin wf_default_template */ 431 427 $smarty->load_filter('pre', 'wf_default_template'); … … 448 444 $security =& Factory::newInstance('SecurityUtils'); //input sanitizer class 449 445 $env['request'] =& $security->process($_REQUEST); //sanitizes input data from client 450 //$env['factory'] =& new ProcessFactory(); //instantiation controller class451 446 $env['factory'] =& Factory::getInstance('ProcessWrapperFactory'); //instantiation controller class 452 447 $env['natural'] =& wf_create_object('wf_natural'); //data access object instance for mainframe … … 454 449 455 450 $GLOBALS['workflow_env'] = &$env; 456 //echo "<br><br><br><br><br>Including $source <br>In request: <pre>";print_r($_REQUEST);echo "</pre>"; 457 //[__leave_activity] is setted if needed in the xxx_pre code or by the user in his code 458 // HERE the user code is 'executed'. Note that we do not use include_once or require_once because 459 //it could the same code several times with automatic activities looping in the graph and it still 460 //need to be executed 451 452 /** 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 457 */ 461 458 $_engineProcessCodeDirectory = GALAXIA_PROCESSES . SEP . $this->process->getNormalizedName(). SEP . 'code'; 462 459 $_engineCompilerDirectory = GALAXIA_LIBRARY . SEP . 'compiler'; … … 484 481 485 482 /** 486 * XXX 487 * here we are going to use our new Security static class. 483 * Here we are going to use our new Security static class. 488 484 * From now, the factory frontend (static) will forward 489 485 * the messages for the process factory instead of Workflow 490 486 * factory. 491 * XXX492 487 */ 493 488 Security::enable(); … … 692 687 unset($GLOBALS['workflow']['wf_instance_url']); 693 688 694 /* CELEPAR */695 689 /* activate local functions */ 696 690 require_once(PHPGW_SERVER_ROOT . SEP . 'workflow' . SEP . 'inc' . SEP . 'local' . SEP . 'functions' . SEP . 'local.functions.php'); 697 /* CELEPAR */698 691 699 692 //get configuration options with default values if no init was done before … … 720 713 $security =& Factory::newInstance('SecurityUtils'); //input sanitizer class 721 714 $env['request'] =& $security->process($_REQUEST); //sanitizes input data from client 722 //$env['factory'] =& new ProcessFactory(); //instantiation controller class723 715 $env['factory'] =& Factory::newInstance('ProcessWrapperFactory'); //instantiation controller class 724 716 $env['natural'] =& wf_create_object('wf_natural'); //data access object instance for mainframe … … 735 727 736 728 /** 737 * XXX738 729 * here we are going to use our new Security static class. 739 730 * From now, the factory frontend (static) will forward … … 741 732 * factory. Note that this is the same comment as the previous 742 733 * function... boooring.. =} 743 * XXX 744 */ 734 */ 745 735 Security::enable(); 746 736 -
sandbox/workflow/branches/993/inc/class.so_move_instances.inc.php
r2372 r2533 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/993/inc/class.so_userinterface.inc.php
r2418 r2533 349 349 { 350 350 /* get ldap connection */ 351 $ldap = & $GLOBALS['workflow']['workflowObjects']->getLDAP();351 $ldap = &Factory::getInstance('WorkflowObjects')->getLDAP(); 352 352 353 353 $searchTermExploded = explode(" ", $searchTerm); … … 429 429 { 430 430 /* get ldap connection */ 431 $ldap = & $GLOBALS['workflow']['workflowObjects']->getLDAP();431 $ldap = &Factory::getInstance('WorkflowObjects')->getLDAP(); 432 432 433 433 /* makes no sense search for an area if the string has more than one word */ … … 525 525 526 526 /* get ldap connection */ 527 $ldap = & $GLOBALS['workflow']['workflowObjects']->getLDAP();527 $ldap = &Factory::getInstance('WorkflowObjects')->getLDAP(); 528 528 529 529 /* searching employees by telephoneNumber in the ldap server */ -
sandbox/workflow/branches/993/inc/class.ui_adminprocesses.inc.php
r2492 r2533 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/993/inc/common.inc.php
r2492 r2533 101 101 */ 102 102 define('WF_BASE_URL', EGW_BASE_URL . "/workflow/"); 103 104 105 $GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects');106 103 ?> -
sandbox/workflow/branches/993/inc/engine/src/API/Instance.php
r2372 r2533 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/993/inc/engine/src/ProcessManager/ActivityManager.php
r2372 r2533 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/993/inc/local/classes/class.wf_engine.php
r2372 r2533 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/993/inc/local/classes/class.wf_instance.php
r2372 r2533 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/993/inc/local/classes/class.wf_ldap.php
r2372 r2533 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/993/inc/local/classes/class.wf_location.php
r2160 r2533 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/993/inc/local/classes/class.wf_orgchart.php
r2371 r2533 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/993/inc/local/classes/class.wf_role.php
r2372 r2533 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/993/inc/local/classes/class.wf_workitem.php
r795 r2533 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/993/inc/nano/NanoController.class.php
r2372 r2533 59 59 function __construct() 60 60 { 61 $this->_mObjJsonConverter = &Factory::newInstance('NanoJsonConverter');62 $this->_mObjJson = &Factory::newInstance('Services_JSON');61 $this->_mObjJsonConverter = new NanoJsonConverter(); 62 $this->_mObjJson = new Services_JSON(); 63 63 } 64 64 … … 130 130 public function iterateOverVirtualRequests() 131 131 { 132 $this->_mObjNanoRequest = &Factory::newInstance('NanoRequest',$this->_mStrClassPath, $this->_mStrClassSuffix, $this->_mStrClassPreffix );132 $this->_mObjNanoRequest = new NanoRequest( $this->_mStrClassPath, $this->_mStrClassSuffix, $this->_mStrClassPreffix ); 133 133 $return_data = array(); 134 134 -
sandbox/workflow/branches/993/inc/nano/NanoGuardian.class.php
r2372 r2533 32 32 public function __construct() 33 33 { 34 $this->_mObjNanoSanitizer = &Factory::newInstance('NanoSanitizer',new DummyLogger);34 $this->_mObjNanoSanitizer = new NanoSanitizer(new DummyLogger); 35 35 } 36 36 -
sandbox/workflow/branches/993/inc/nano/NanoJsonConverter.class.php
r2372 r2533 118 118 // initialize JSON object 119 119 $this->_mObjJson = ( strtolower($return_type) != 'object' ) 120 ? Factory::getInstance('Services_JSON',SERVICES_JSON_LOOSE_TYPE )121 : Factory::getInstance('Services_JSON');120 ? new Services_JSON( SERVICES_JSON_LOOSE_TYPE ) 121 : new Services_JSON(); 122 122 } 123 123 -
sandbox/workflow/branches/993/inc/natural/class.natural.php
r795 r2533 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/993/lib/factory/WorkflowFactory.php
r2372 r2533 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.