From 993a2eac70292094272e06e3d328109da6794697 Mon Sep 17 00:00:00 2001 From: "uwe.tews@googlemail.com" Date: Wed, 9 Jan 2013 23:35:40 +0000 Subject: [PATCH] - enhancement to allow variable constant names like {$smarty.const.{$foo}} (Forum Topic 23970) --- change_log.txt | 1 + .../smarty_internal_compile_private_special_variable.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 61f236e4..46188013 100644 --- a/change_log.txt +++ b/change_log.txt @@ -3,6 +3,7 @@ - bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966) - bugfix template inheritance could fail if nested {block} tags in childs did contain {$smarty.block.child} (Issue #127) - bugfix template inheritance could fail if {block} tags in childs did have similar name as used plugins (Issue #128) +- enhancement to allow variable constant names like {$smarty.const.{$foo}} (Forum Topic 23970) 06.01.2013 - Allow '://' URL syntax in template names of stream resources (Issue #129) diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index 986a11c1..af8fcd37 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -77,7 +77,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C $compiler->trigger_template_error("(secure mode) constants not permitted"); break; } - return '@' . trim($_index[1], "'"); + return "@constant({$_index[1]})"; case 'config': if (isset($_index[2])) {