try using xet files if db is not availible (eg. early setup stage)

This commit is contained in:
Ralf Becker 2006-06-15 21:52:40 +00:00
parent e14cc06c49
commit 5f35a0cf8b

View File

@ -87,8 +87,15 @@
*/
function soetemplate($name='',$template='',$lang='',$group=0,$version='',$rows=1,$cols=1)
{
$this->db = clone($GLOBALS['egw']->db);
$this->db->set_app('etemplate');
if (is_object($GLOBALS['egw']->db))
{
$this->db = clone($GLOBALS['egw']->db);
$this->db->set_app('etemplate');
}
else
{
$GLOBALS['egw_info']['server']['eTemplate-source'] = 'files';
}
$this->db_cols = $this->db_key_cols + $this->db_data_cols;
if (empty($name))