remove unneed dummy $smarty template variable

This commit is contained in:
Uwe Tews
2015-08-02 21:12:33 +02:00
parent c95ff14434
commit 7dfe853076

View File

@@ -228,10 +228,6 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
$this->tpl_vars = $tpl_vars; $this->tpl_vars = $tpl_vars;
$this->config_vars = $config_vars; $this->config_vars = $config_vars;
} }
// dummy local smarty variable
if (!isset($this->tpl_vars['smarty'])) {
$this->tpl_vars['smarty'] = new Smarty_Variable;
}
$_smarty_old_error_level = isset($this->smarty->error_reporting) ? error_reporting($this->smarty->error_reporting) : null; $_smarty_old_error_level = isset($this->smarty->error_reporting) ? error_reporting($this->smarty->error_reporting) : null;
// check URL debugging control // check URL debugging control
if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') { if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') {
@@ -511,8 +507,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
// get variables from calling scope // get variables from calling scope
if ($parent_scope == Smarty::SCOPE_LOCAL) { if ($parent_scope == Smarty::SCOPE_LOCAL) {
$tpl->tpl_vars = $this->tpl_vars; $tpl->tpl_vars = $this->tpl_vars;
$tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty']; } elseif ($parent_scope == Smarty::SCOPE_PARENT) {
} elseif ($parent_scope == Smarty::SCOPE_PARENT) {
$tpl->tpl_vars = &$this->tpl_vars; $tpl->tpl_vars = &$this->tpl_vars;
} elseif ($parent_scope == Smarty::SCOPE_GLOBAL) { } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {
$tpl->tpl_vars = &Smarty::$global_tpl_vars; $tpl->tpl_vars = &Smarty::$global_tpl_vars;