only try replacement loading of classes, if there is a replacement available; if defaultimap, load emailadmin_oldimap

This commit is contained in:
Klaus Leithoff 2013-12-05 09:23:58 +00:00
parent 38644b8b3c
commit 50279607a6

View File

@ -755,8 +755,6 @@ function &CreateObject($class)
list($appname,$classname) = explode('.',$class);
if (!class_exists($classname))
{
if (!file_exists(EGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php'))
{
static $replace = array(
'datetime' => 'egw_datetime',
@ -769,7 +767,10 @@ function &CreateObject($class)
'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]))
{
if (isset($replace[$classname]))
{
//throw new Exception(__METHOD__."('$class') old classname '$classname' used in menuaction=$_GET[menuaction]!");