use db from phpgw_setup if the phpgw one is not availible

This commit is contained in:
Ralf Becker 2003-10-07 22:02:30 +00:00
parent b3dfa3d386
commit 519e874afb

View File

@ -35,7 +35,7 @@
$appname = $GLOBALS['phpgw_info']['flags']['currentapp'];
}
$this->db = $GLOBALS['phpgw']->db;
$this->db = is_object($GLOBALS['phpgw']->db) ? $GLOBALS['phpgw']->db : $GLOBALS['phpgw_setup']->db;
$this->appname = $appname;
}