if called by setup, use setup's db-instance

This commit is contained in:
Ralf Becker 2005-11-14 10:21:02 +00:00
parent f73e127499
commit 85406b1a86

View File

@ -42,9 +42,16 @@
{
$appname = $GLOBALS['egw_info']['flags']['currentapp'];
}
$this->appname = $appname;
$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');
}