From 5f35a0cf8b9a1e84751cb7fcfbc9955c93e970f6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 15 Jun 2006 21:52:40 +0000 Subject: [PATCH] try using xet files if db is not availible (eg. early setup stage) --- etemplate/inc/class.soetemplate.inc.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etemplate/inc/class.soetemplate.inc.php b/etemplate/inc/class.soetemplate.inc.php index e0d51602aa..347e4c90ab 100644 --- a/etemplate/inc/class.soetemplate.inc.php +++ b/etemplate/inc/class.soetemplate.inc.php @@ -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))