From aab9e4894c7318dccfdda7cbaa62e1604d74f9b8 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 25 Apr 2001 15:32:52 +0000 Subject: [PATCH] Changing the way tpl vars are referenced and passing smarty object to custom functions. --- Smarty_Compiler.class.php | 4 ++-- libs/Smarty_Compiler.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index cdf4de19..16a01e6c 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -277,7 +277,7 @@ class Smarty_Compiler extends Smarty { $arg_list[] = "'$arg_name' => $arg_value"; } - return ""; + return ""; } /*======================================================================*\ @@ -713,7 +713,7 @@ class Smarty_Compiler extends Smarty { $indexes = preg_split('![\[\]]!', $var_ref, -1, PREG_SPLIT_NO_EMPTY); $var_name = array_shift($indexes); - $output = "\$$var_name"; + $output = "\$this->_tpl_vars['$var_name']"; foreach ($indexes as $index) { if ($index{0} == '.') { diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index cdf4de19..16a01e6c 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -277,7 +277,7 @@ class Smarty_Compiler extends Smarty { $arg_list[] = "'$arg_name' => $arg_value"; } - return ""; + return ""; } /*======================================================================*\ @@ -713,7 +713,7 @@ class Smarty_Compiler extends Smarty { $indexes = preg_split('![\[\]]!', $var_ref, -1, PREG_SPLIT_NO_EMPTY); $var_name = array_shift($indexes); - $output = "\$$var_name"; + $output = "\$this->_tpl_vars['$var_name']"; foreach ($indexes as $index) { if ($index{0} == '.') {