make boetemplate::store_to_cache public (static) to call it from xul_io

This commit is contained in:
Ralf Becker 2009-03-19 12:06:49 +00:00
parent 432798715a
commit 52db44fb83
2 changed files with 7 additions and 4 deletions

View File

@ -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 "<p>store_in_cache('$this->name','$this->template','$this->lang','$this->version')</p>\n";
self::$template_cache[$this->cache_name()] = $this->as_array(1);
if (is_null($tpl)) $tpl = $this;
//echo "<p>store_in_cache('$tpl->name','$tpl->template','$tpl->lang','$tpl->version')</p>\n";
self::$template_cache[$tpl->cache_name()] = $tpl->as_array(1);
}
/**

View File

@ -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();