From 7bb7b3ac03e9e0dc5f075b50a618167073135c1a Mon Sep 17 00:00:00 2001 From: Larry Lewis Date: Thu, 11 Dec 2014 08:06:27 +1100 Subject: [PATCH] Commit 7b2a2c4a883ba745759fb5db26ab8134a5ae282b changed the constant processing to allow a variable in teh $smarty.const but this broke the normal callout. Change allows both methods. --- .../smarty_internal_compile_private_special_variable.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index 23b17ae1..1b6cf375 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -79,8 +79,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C $compiler->trigger_template_error("(secure mode) constants not permitted"); break; } - - return "@constant({$_index[1]})"; + if( strpos( $_index[1], '$') === false ){ + return "@constant('{$_index[1]}')"; + } else { + return "@constant({$_index[1]})"; + } case 'config': if (isset($_index[2])) {