finding the db-object from setup too

This commit is contained in:
Ralf Becker 2005-11-24 20:48:31 +00:00
parent d8932b3ad3
commit 43ae18fb7a
2 changed files with 16 additions and 2 deletions

View File

@ -108,7 +108,14 @@
// enable the caching in the session onyl for ldap
$this->use_session_cache = $GLOBALS['egw_info']['server']['account_repository'] == 'ldap';
$this->db =& $GLOBALS['egw']->db;
if (is_object($GLOBALS['egw_setup']->db))
{
$this->db = clone($GLOBALS['egw_setup']->db);
}
else
{
$this->db = clone($GLOBALS['egw']->db);
}
if($account_id != '')
{

View File

@ -72,7 +72,14 @@
*/
function acl($account_id = '')
{
$this->db = clone($GLOBALS['egw']->db);
if (is_object($GLOBALS['egw_setup']->db))
{
$this->db = clone($GLOBALS['egw_setup']->db);
}
else
{
$this->db = clone($GLOBALS['egw']->db);
}
$this->db->set_app('phpgwapi');
if ((int)$this->account_id != (int)$account_id)