From 9bca7a76891ae1c9471f903ec3c1f23a5294d980 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 7 Oct 2008 15:50:53 +0000 Subject: [PATCH] moved phpgw compatibility stuff into common_functions.inc.php --- header.inc.php.template | 14 -------------- phpgwapi/inc/common_functions.inc.php | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/header.inc.php.template b/header.inc.php.template index 0c1527f99c..1b54ae2819 100644 --- a/header.inc.php.template +++ b/header.inc.php.template @@ -94,20 +94,6 @@ $GLOBALS['egw_info']['server']['versions']['current_header'] = $setup_info['phpg unset($setup_info); $GLOBALS['egw_info']['server']['versions']['header'] = '1.28'; -// some not longer necessary defines -if (isset($GLOBALS['egw_info']['flags']['phpgw_compatibility']) && $GLOBALS['egw_info']['flags']['phpgw_compatibility']) -{ - define('PHPGW_API_INC',EGW_API_INC); - define('PHPGW_SERVER_ROOT',EGW_SERVER_ROOT); - define('PHPGW_INCLUDE_ROOT',EGW_INCLUDE_ROOT); - - /* debugging settings */ - define('DEBUG_DATATYPES', True); - define('DEBUG_LEVEL', 3); - define('DEBUG_OUTPUT', 2); /* 1 = screen, 2 = DB. For both use 3. */ - define('DEBUG_TIMER', False); -} - if(!isset($GLOBALS['egw_info']['flags']['noapi']) || !$GLOBALS['egw_info']['flags']['noapi']) { ob_start(); // to prevent error messages to be send before our headers diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index 71527a16b4..b1bcc6aee1 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -684,6 +684,7 @@ function &CreateObject($class) ); if (isset($replace[$classname])) { + //throw new Exception(__METHOD__."('$class') old classname '$classname' used in menuaction=$_GET[menuaction]!"); error_log(__METHOD__."('$class') old classname '$classname' used in menuaction=$_GET[menuaction]!"); $classname = $replace[$classname]; include_once(EGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php'); @@ -1425,3 +1426,17 @@ if (!isset($GLOBALS['egw_info']['flags']['no_exception_handler']) || !$GLOBALS[' { set_exception_handler('egw_exception_handler'); } + +// some not longer necessary defines +if (isset($GLOBALS['egw_info']['flags']['phpgw_compatibility']) && $GLOBALS['egw_info']['flags']['phpgw_compatibility']) +{ + define('PHPGW_API_INC',EGW_API_INC); + define('PHPGW_SERVER_ROOT',EGW_SERVER_ROOT); + define('PHPGW_INCLUDE_ROOT',EGW_INCLUDE_ROOT); + + /* debugging settings */ + define('DEBUG_DATATYPES', True); + define('DEBUG_LEVEL', 3); + define('DEBUG_OUTPUT', 2); /* 1 = screen, 2 = DB. For both use 3. */ + define('DEBUG_TIMER', False); +}