From 52db44fb8390bdc44b595f5333a5bd31525d103d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 19 Mar 2009 12:06:49 +0000 Subject: [PATCH] make boetemplate::store_to_cache public (static) to call it from xul_io --- etemplate/inc/class.boetemplate.inc.php | 9 ++++++--- etemplate/inc/class.xul_io.inc.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 207256fca4..ae0b71da5d 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -725,11 +725,14 @@ class boetemplate extends soetemplate /** * stores the etemplate in the cache in egw_info + * + * @param boetemplate $tpl=null required parameter for static use! */ - private function store_in_cache() + public /*static*/ function store_in_cache(boetemplate $tpl=null) { - //echo "

store_in_cache('$this->name','$this->template','$this->lang','$this->version')

\n"; - self::$template_cache[$this->cache_name()] = $this->as_array(1); + if (is_null($tpl)) $tpl = $this; + //echo "

store_in_cache('$tpl->name','$tpl->template','$tpl->lang','$tpl->version')

\n"; + self::$template_cache[$tpl->cache_name()] = $tpl->as_array(1); } /** diff --git a/etemplate/inc/class.xul_io.inc.php b/etemplate/inc/class.xul_io.inc.php index 91532518b6..374df3f182 100644 --- a/etemplate/inc/class.xul_io.inc.php +++ b/etemplate/inc/class.xul_io.inc.php @@ -508,7 +508,7 @@ // save tmpl to the cache, as the file may contain more then one tmpl $cname = ($etempl->template == '' ? 'default' : $etempl->template).'/'.$etempl->name. ($etempl->lang == '' ? '' : '.'.$etempl->lang); - boetemplate::$template_cache[$cname] = $etempl->as_array(1); + boetemplate::store_in_cache($etempl); if ($this->debug) { $etempl->echo_tmpl();