From 50279607a692699b605db12f69dc7adcfc49ff66 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 5 Dec 2013 09:23:58 +0000 Subject: [PATCH] only try replacement loading of classes, if there is a replacement available; if defaultimap, load emailadmin_oldimap --- phpgwapi/inc/common_functions.inc.php | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php index 48be1ea9aa..361d6e3c57 100755 --- a/phpgwapi/inc/common_functions.inc.php +++ b/phpgwapi/inc/common_functions.inc.php @@ -756,20 +756,21 @@ function &CreateObject($class) if (!class_exists($classname)) { - if (!file_exists(EGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php')) + static $replace = array( + 'datetime' => 'egw_datetime', + 'uitimesheet' => 'timesheet_ui', + 'uiinfolog' => 'infolog_ui', + 'uiprojectmanager' => 'projectmanager_ui', + 'uiprojectelements' => 'projectmanager_elements_ui', + 'uiroles' => 'projectmanager_roles_ui', + 'uimilestones' => 'projectmanager_milestones_ui', + 'uipricelist' => 'projectmanager_pricelist_ui', + 'bowiki' => 'wiki_bo', + 'uicategories' => 'admin_categories', + 'defaultimap' => 'emailadmin_oldimap', + ); + if (!file_exists(EGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php') || isset($replace[$classname])) { - static $replace = array( - 'datetime' => 'egw_datetime', - 'uitimesheet' => 'timesheet_ui', - 'uiinfolog' => 'infolog_ui', - 'uiprojectmanager' => 'projectmanager_ui', - 'uiprojectelements' => 'projectmanager_elements_ui', - 'uiroles' => 'projectmanager_roles_ui', - 'uimilestones' => 'projectmanager_milestones_ui', - 'uipricelist' => 'projectmanager_pricelist_ui', - 'bowiki' => 'wiki_bo', - 'uicategories' => 'admin_categories', - ); if (isset($replace[$classname])) { //throw new Exception(__METHOD__."('$class') old classname '$classname' used in menuaction=$_GET[menuaction]!");