fix PHP Fatal error: Call to undefined method EGroupware\Api\Session::appsession() during SiteMgr installation

This commit is contained in:
Ralf Becker 2016-05-31 22:44:19 +02:00
parent ca04e639c4
commit 05e5c6181f

View File

@ -17,11 +17,6 @@ namespace EGroupware\Api\Egw;
use EGroupware\Api; use EGroupware\Api;
// explicitly list old, non-namespaced classes
// they are only used, if phpgwapi is installed
use accounts as egw_accounts;
use egw_session;
/** /**
* Egw\Base object used in setup, does not instanciate anything by default * Egw\Base object used in setup, does not instanciate anything by default
* *
@ -119,6 +114,12 @@ class Base
unset($e); unset($e);
return null; return null;
} }
case 'session':
$class = file_exists(EGW_SERVER_ROOT.'/phpgwapi') ? 'egw_session' : 'EGroupware\\Api\\Session';
break;
case 'accounts':
$class = file_exists(EGW_SERVER_ROOT.'/phpgwapi') ? 'accounts' : 'EGroupware\\Api\\Accounts';
break;
case 'ldap': case 'ldap':
return $this->ldap = Api\Ldap::factory(false); return $this->ldap = Api\Ldap::factory(false);
default: default: