- bugix overloading problem when $smarty->fetch()/display() have been used in plugins (introduced with 3.0.2)

This commit is contained in:
uwe.tews@googlemail.com
2010-11-13 15:26:03 +00:00
parent fb29ed63ed
commit 7dc5c0a09d
2 changed files with 27 additions and 9 deletions

View File

@@ -1,3 +1,9 @@
13/11/2010
- bugfix overloading problem when $smarty->fetch()/display() have been used in plugins
(introduced with 3.0.2)
===== Smarty 3.0.3 =====
13/11/2010
- bugfix on {debug}
- reverted location of loadPlugin() to Smarty class

View File

@@ -818,13 +818,6 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
settype($this->tpl_vars[$tpl_var]->value, 'array');
}
}
/**
* wrapper for display
*/
public function display ()
{
return $this->smarty->display($this);
}
/**
* [util function] counts an array, arrayaccess/traversable or PDOStatement object
@@ -861,10 +854,29 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
/**
* wrapper for fetch
*/
public function fetch ()
public function fetch ($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false)
{
return $this->smarty->fetch($this);
if ($template == null) {
return $this->smarty->fetch($this);
} else {
return $this->smarty->fetch($template, $cache_id, $compile_id, $parent, $display);
}
}
/**
* wrapper for display
*/
public function display ($template = null, $cache_id = null, $compile_id = null, $parent = null)
{
if ($template == null) {
return $this->smarty->display($this);
} else {
return $this->smarty->display($template, $cache_id, $compile_id, $parent);
}
}
/**
* set Smarty property in template context
* @param string $property_name property name