Changeset 2223
- Timestamp:
- 03/11/10 15:42:15 (14 years ago)
- Location:
- sandbox/workflow/branches/609
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/609/inc/class.ui_userinterface.inc.php
r2107 r2223 45 45 $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['workflow']['title']; 46 46 $GLOBALS['phpgw_info']['flags'] = array('noheader' => false, 'nonavbar' => false, 'currentapp' => 'workflow'); 47 $smarty = CreateObject('workflow.workflow_smarty'); 47 //$smarty = CreateObject('workflow.workflow_smarty'); 48 $smarty = Factory::getInstance('workflow_smarty'); 48 49 49 50 // Check if workflow config is ok -
sandbox/workflow/branches/609/inc/common.inc.php
r2222 r2223 12 12 13 13 /** 14 * Server base path. This constant must be defined by expresso itself.15 * Anyway, there are cases that we access Workflow directly; therefore16 * it must be defined somewhere...17 * @name PHPGW_SERVER_ROOT14 * Server base path. This constant is somewhat simililar to 15 * 'PHPGW_SERVER_ROOT'. Nevertheless, there are cases that we 16 * access Workflow directly and it must be defined somewhere. 17 * @name EGW_SERVER_ROOT 18 18 */ 19 if (!defined('PHPGW_SERVER_ROOT')) 20 define('PHPGW_SERVER_ROOT', $HTTP_SERVER_VARS['DOCUMENT_ROOT']); 19 define('EGW_SERVER_ROOT', $HTTP_SERVER_VARS['DOCUMENT_ROOT']); 21 20 22 21 /** … … 24 23 * @name WF_SERVER_ROOT 25 24 */ 26 define('WF_SERVER_ROOT', PHPGW_SERVER_ROOT.'/workflow/');25 define('WF_SERVER_ROOT', EGW_SERVER_ROOT.'/workflow/'); 27 26 28 27 /** … … 39 38 40 39 41 if (file_exists( PHPGW_SERVER_ROOT . '/header.session.inc.php')) {42 require_once PHPGW_SERVER_ROOT . '/header.session.inc.php';40 if (file_exists(EGW_SERVER_ROOT . '/header.session.inc.php')) { 41 require_once EGW_SERVER_ROOT . '/header.session.inc.php'; 43 42 } 44 43 … … 54 53 /* including common classes */ 55 54 require_once WF_LIB_ROOT . 'security/Security.php'; 56 //require_once WF_LIB_ROOT . 'factory/Factory.php';55 require_once WF_LIB_ROOT . 'factory/Factory.php'; 57 56 require_once WF_LIB_ROOT . 'factory/BaseFactory.php'; 58 57 require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php'; 59 58 require_once WF_LIB_ROOT . 'factory/ProcessFactory.php'; 60 59 61 62 /* TODO - here we will still using that old and ugly factory */ 63 /* in a near future we should do things right.. */ 64 require_once WF_INC_ROOT . 'class.factory.inc.php'; 65 $GLOBALS['workflow']['factory'] = new Factory(); 66 $GLOBALS['workflow']['workflowObjects'] = $GLOBALS['workflow']['factory']->newInstance('WorkflowObjects'); 67 68 //$GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects', 'asd', 123); 60 $GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects'); 69 61 ?> -
sandbox/workflow/branches/609/lib/factory/Factory.php
r2222 r2223 74 74 75 75 $args = func_get_args(); 76 call_user_func_array(array(self::$_securedFactory, "getInstance"), $args);76 return call_user_func_array(array(self::$_securedFactory, "getInstance"), $args); 77 77 78 78 } … … 85 85 86 86 $args = func_get_args(); 87 call_user_func_array(array(self::$_unsecuredFactory, "getInstance"), $args);87 return call_user_func_array(array(self::$_unsecuredFactory, "getInstance"), $args); 88 88 } 89 90 89 } 91 90 -
sandbox/workflow/branches/609/lib/factory/WorkflowFactory.php
r2222 r2223 49 49 /* registering allowed classes */ 50 50 $this->registerFileInfo('WorkflowObjects', 'class.WorkflowObjects.inc.php', 'inc'); 51 $this->registerFileInfo('TemplateServer', 'class.TemplateServer.inc.php', 'inc'); 52 $this->registerFileInfo('workflow_smarty', 'class.workflow_smarty.inc.php', 'inc'); 51 53 52 $this->registerFileInfo('db', 'x', 'inc', PHPGW_API_INC); 54 /* registering egw class example */ 55 //$this->registerFileInfo('db', 'x', 'inc', PHPGW_API_INC); 53 56 54 57 /* ok. no more instances of this class.. */ -
sandbox/workflow/branches/609/templateFile.php
r1468 r2223 12 12 if (empty($_SESSION)) 13 13 exit(0); 14 $GLOBALS['workflow']['factory']->getInstance('TemplateServer')->redirect(); 14 //$GLOBALS['workflow']['factory']->getInstance('TemplateServer')->redirect(); 15 Factory::getInstance('TemplateServer')->redirect(); 15 16 ?>
Note: See TracChangeset
for help on using the changeset viewer.