fixing problem with autoloading subclasses of emailadmin, which are not name-scheme conform to EGroupwares autoload routines

This commit is contained in:
Klaus Leithoff 2009-05-14 09:02:06 +00:00
parent 5f6f384954
commit 98c2440243

View File

@ -578,12 +578,27 @@
function restoreSessionData()
{
$GLOBALS['egw_info']['flags']['autoload'] = array(__CLASS__,'autoload');
//echo function_backtrace()."<br>";
//unserializing the sessiondata, since they are serialized for objects sake
$this->sessionData = (array) unserialize($GLOBALS['egw']->session->appsession('session_data','emailadmin'));
#$this->userSessionData = $GLOBALS['egw']->session->appsession('user_session_data','emailadmin');
}
/**
* Autoload classes from emailadmin, 'til they get autoloading conform names
*
* @param string $class
*/
static function autoload($class)
{
if (file_exists($file=EGW_INCLUDE_ROOT.'/emailadmin/inc/class.'.$class.'.inc.php'))
{
include_once($file);
}
}
function saveSMTPForwarding($_accountID, $_forwardingAddress, $_keepLocalCopy)
{
if (is_object($this->smtpClass))