diff --git a/change_log.txt b/change_log.txt index d80c2667..488945c1 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,6 +1,7 @@  ===== 3.1.29-dev ===== (xx.xx.2015) 20.12.2015 - bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123 + - update compilation of Smarty special variables 19.12.2015 - bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 6793bfa2..7ae0c75d 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.29-dev/14'; + const SMARTY_VERSION = '3.1.29-dev/15'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php index 7092fc54..b83e824a 100644 --- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php +++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php @@ -85,9 +85,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C return 'dirname($_smarty_tpl->source->filepath)'; case 'version': - $_version = Smarty::SMARTY_VERSION; - - return "'$_version'"; + return "Smarty::SMARTY_VERSION"; case 'const': if (isset($compiler->smarty->security_policy) && @@ -109,17 +107,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C return "\$_smarty_tpl->smarty->ext->configload->_getConfigVariable(\$_smarty_tpl, $_index[1])"; } case 'ldelim': - $_ldelim = $compiler->smarty->left_delimiter; - - return "'$_ldelim'"; - + return "\$_smarty_tpl->smarty->left_delimiter"; case 'rdelim': - $_rdelim = $compiler->smarty->right_delimiter; - - return "'$_rdelim'"; - + return "\$_smarty_tpl->smarty->right_delimiter"; default: - $compiler->trigger_template_error('$smarty.' . trim($_index[ 0 ], "'") . ' is invalid'); + $compiler->trigger_template_error('$smarty.' . trim($_index[ 0 ], "'") . ' is not defined'); break; } if (isset($_index[ 1 ])) {