Changeset 2418 for sandbox/workflow/branches/993/inc/common.inc.php
- Timestamp:
- 04/05/10 15:30:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/branches/993/inc/common.inc.php
r2372 r2418 11 11 12 12 /** 13 * Server base path. This constant is somewhat simililar to 14 * 'PHPGW_SERVER_ROOT'. Nevertheless, there are cases that we 15 * access Workflow directly and it must be defined somewhere. 16 * Recently discovered, when we are runnnig jobs HTTP_SERVER_VARS 17 * exported by apache are not available. 18 * Therefore, we are using this workaround here, setting 19 * EGW_SERVER_ROOT based on the location of this file. This constant 20 * should be updated properly every time we move this file. 13 * This is other big workaround. In ajax calls, we use controller.php 14 * directly, which do not includes header.inc for performance issues. 15 * However, for phpgwAPI to work properly we need to set several 16 * constants and objects, which are created in this file (header.inc). 17 * As much as this problem still unsolved (by phpAPI group), this potencially 18 * problematic and ugly code must still here.. =( 19 */ 20 $old = $GLOBALS['phpgw_info']['flags']; 21 $GLOBALS['phpgw_info']['flags'] = array( 22 'noheader' => True, 23 'nonavbar' => True, 24 'currentapp' => 'workflow' 25 ); 26 /* TODO TODO TODO TODO */ 27 $base = dirname(dirname(dirname(__FILE__))); 28 require_once ($base . '/header.inc.php'); 29 $GLOBALS['phpgw_info']['flags'] = $old; 30 31 32 /** 33 * Server base path. In this module, we should only use 34 * constants defined here. PHPGW_SERVER_ROOT is defined 35 * on 'header.inc.php' which is always included by this 36 * file. 21 37 * @name EGW_SERVER_ROOT 22 38 */ 23 define('EGW_SERVER_ROOT', dirname(dirname(dirname(__FILE__)))); 24 //define('EGW_SERVER_ROOT', $GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']); 39 define('EGW_SERVER_ROOT', PHPGW_SERVER_ROOT); 25 40 26 41 /** … … 51 66 52 67 53 if (file_exists(EGW_SERVER_ROOT . '/header.session.inc.php')) {54 require_once EGW_SERVER_ROOT . '/header.session.inc.php';55 }56 57 68 58 69 /* assure that the correct encondig will be used (e.g string functions) */ … … 70 81 require_once WF_LIB_ROOT . 'factory/WorkflowFactory.php'; 71 82 require_once WF_LIB_ROOT . 'factory/ProcessFactory.php'; 83 require_once WF_LIB_ROOT . 'settings/Settings.php'; 84 85 Settings::load(); 72 86 73 87 $GLOBALS['workflow']['workflowObjects'] = Factory::getInstance('WorkflowObjects');
Note: See TracChangeset
for help on using the changeset viewer.