mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 12:21:26 +02:00
finding the db-object from setup too
This commit is contained in:
parent
d8932b3ad3
commit
43ae18fb7a
@ -108,7 +108,14 @@
|
|||||||
// enable the caching in the session onyl for ldap
|
// enable the caching in the session onyl for ldap
|
||||||
$this->use_session_cache = $GLOBALS['egw_info']['server']['account_repository'] == '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 != '')
|
if($account_id != '')
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,14 @@
|
|||||||
*/
|
*/
|
||||||
function acl($account_id = '')
|
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');
|
$this->db->set_app('phpgwapi');
|
||||||
|
|
||||||
if ((int)$this->account_id != (int)$account_id)
|
if ((int)$this->account_id != (int)$account_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user