use db from phpgw_setup if the phpgw one is not availible

This commit is contained in:
Ralf Becker 2003-10-07 22:38:06 +00:00
parent 519e874afb
commit 3360c838f6

View File

@ -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);
}