mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
* Mail: fix for Horde_Imap_Client-2.26.0 requiring Horde_Mail-2.5.1 requring Horde_Idna-1.0.1 which stalls our autoloader by calling spl_autoload_register
This commit is contained in:
parent
90d468c9dd
commit
1945463c6d
@ -1640,6 +1640,9 @@ function __autoload($class)
|
||||
if (file_exists($file = EGW_INCLUDE_ROOT.'/'.$app.'/inc/class.'.$class.'.inc.php') ||
|
||||
// classes using the new naming schema app_class_name, eg. admin_cmd
|
||||
isset($components[0]) && file_exists($file = EGW_INCLUDE_ROOT.'/'.$app.'/inc/class.'.$app.'_'.$components[0].'.inc.php') ||
|
||||
// classes with an underscore in their name
|
||||
!isset($GLOBALS['egw_info']['apps'][$app]) && isset($GLOBALS['egw_info']['apps'][$app . '_' . $components[0]]) &&
|
||||
file_exists($file = EGW_INCLUDE_ROOT.'/'.$app.'_'.$components[0].'/inc/class.'.$class.'.inc.php') ||
|
||||
// eGW api classes using the old naming schema, eg. html
|
||||
file_exists($file = EGW_API_INC.'/class.'.$class.'.inc.php') ||
|
||||
// eGW api classes containing multiple classes in on file, eg. egw_exception
|
||||
@ -1652,7 +1655,7 @@ function __autoload($class)
|
||||
!isset($GLOBALS['egw_info']['apps'][$app]) && @include($file = strtr($class, array('_'=>'/','\\'=>'/')).'.php'))
|
||||
{
|
||||
include_once($file);
|
||||
//error_log("autoloading class $class by include_once($file)");
|
||||
//if (!class_exists($class, false) && !interface_exists($class, false)) error_log("autoloading class $class by include_once($file) failed!");
|
||||
}
|
||||
// allow apps to define an own autoload method
|
||||
elseif (isset($GLOBALS['egw_info']['flags']['autoload']) && is_callable($GLOBALS['egw_info']['flags']['autoload']))
|
||||
@ -1660,6 +1663,8 @@ function __autoload($class)
|
||||
call_user_func($GLOBALS['egw_info']['flags']['autoload'],$class);
|
||||
}
|
||||
}
|
||||
// register our autoloader with sql, so other PHP code can use spl_autoload_register, without stalling our autoloader
|
||||
spl_autoload_register('__autoload');
|
||||
|
||||
/**
|
||||
* Clasify exception for a headline and log it to error_log, if not running as cli
|
||||
|
Loading…
Reference in New Issue
Block a user