From 3360c838f6e70f2cdf0f8d2d6e811f75ab4410ae Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 7 Oct 2003 22:38:06 +0000 Subject: [PATCH] use db from phpgw_setup if the phpgw one is not availible --- phpgwapi/inc/class.preferences.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index 2d6a0f0f9f..6f6b9246be 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -62,7 +62,7 @@ */ function preferences($account_id = '') { - $this->db = $GLOBALS['phpgw']->db; + $this->db = is_object($GLOBALS['phpgw']->db) ? $GLOBALS['phpgw']->db : $GLOBALS['phpgw_setup']->db; $this->account_id = get_account_id($account_id); }