From 33082844a5f790e4419e527470ab77286a4134d1 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Fri, 10 Apr 2009 02:29:46 +0000 Subject: [PATCH] - fixed {$smarty.block.parent.foo} --- change_log.txt | 1 + libs/sysplugins/internal.compile_smarty.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index cd5d5f93..e16a554d 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,5 @@ 04/10/2009 +- fixed {$smarty.block.parent.foo} - implementation of a 'variable' filter as replacement for default modifier 04/09/2009 diff --git a/libs/sysplugins/internal.compile_smarty.php b/libs/sysplugins/internal.compile_smarty.php index cfd4b2d0..4afb4b2e 100644 --- a/libs/sysplugins/internal.compile_smarty.php +++ b/libs/sysplugins/internal.compile_smarty.php @@ -83,8 +83,8 @@ class Smarty_Internal_Compile_Smarty extends Smarty_Internal_CompileBase { case 'global': return "\$_smarty_tpl->smarty->getGlobalVariable($_index[1])->value"; case 'block': - if ($_index[2] == '\'parent\'') { - return "'" . addcslashes($compiler->template->block_data[trim($_index[1], "'")]['source'], "'") . "'"; + if ($_index[1] == '\'parent\'') { + return "'" . addcslashes($compiler->template->block_data[trim($_index[2], "'")]['source'], "'") . "'"; } else { return "''"; }