mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
using the singleton passtern to get a instance of the accounts class and call the setAccountId function to set the accountId
This commit is contained in:
parent
51f14c8d82
commit
09f1287d6c
@ -145,7 +145,10 @@
|
||||
$this->common =& CreateObject('phpgwapi.common');
|
||||
$this->hooks =& CreateObject('phpgwapi.hooks');
|
||||
$this->auth =& CreateObject('phpgwapi.auth');
|
||||
$this->accounts =& CreateObject('phpgwapi.accounts');
|
||||
# maybe we can also include this file at another place
|
||||
# with PHP5 we can also use autoloading now
|
||||
include_once(EGW_INCLUDE_ROOT.'/phpgwapi/inc/class.accounts.inc.php');
|
||||
$this->accounts = accounts::getInstance();
|
||||
$this->acl =& CreateObject('phpgwapi.acl');
|
||||
/* Do not create the session object if called by the sessions class. This way
|
||||
* we ensure the correct db based on the user domain.
|
||||
|
@ -428,7 +428,7 @@
|
||||
if ($fill_egw_info_and_repositories)
|
||||
{
|
||||
$GLOBALS['egw']->acl->acl($this->account_id);
|
||||
$GLOBALS['egw']->accounts->accounts($this->account_id);
|
||||
accounts::getInstance()->setAccountId($this->account_id);
|
||||
$GLOBALS['egw']->preferences->preferences($this->account_id);
|
||||
$GLOBALS['egw']->applications->applications($this->account_id);
|
||||
}
|
||||
@ -1019,7 +1019,7 @@
|
||||
function read_repositories($cached='',$write_cache=True)
|
||||
{
|
||||
$GLOBALS['egw']->acl->acl($this->account_id);
|
||||
$GLOBALS['egw']->accounts->accounts($this->account_id);
|
||||
accounts::getInstance()->setAccountId($this->account_id);
|
||||
$GLOBALS['egw']->preferences->preferences($this->account_id);
|
||||
$GLOBALS['egw']->applications->applications($this->account_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user