- update compilation of Smarty special variables

This commit is contained in:
uwetews
2015-12-20 15:13:34 +01:00
parent e655856871
commit 6483164d18
3 changed files with 6 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
 ===== 3.1.29-dev ===== (xx.xx.2015)  ===== 3.1.29-dev ===== (xx.xx.2015)
20.12.2015 20.12.2015
- bugfix failure when the default resource type was set to 'extendsall' https://github.com/smarty-php/smarty/issues/123 - 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 19.12.2015
- bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138 - bugfix using $smarty.capture.foo in expressions could fail https://github.com/smarty-php/smarty/pull/138

View File

@@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.29-dev/14'; const SMARTY_VERSION = '3.1.29-dev/15';
/** /**
* define variable scopes * define variable scopes

View File

@@ -85,9 +85,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
return 'dirname($_smarty_tpl->source->filepath)'; return 'dirname($_smarty_tpl->source->filepath)';
case 'version': case 'version':
$_version = Smarty::SMARTY_VERSION; return "Smarty::SMARTY_VERSION";
return "'$_version'";
case 'const': case 'const':
if (isset($compiler->smarty->security_policy) && 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])"; return "\$_smarty_tpl->smarty->ext->configload->_getConfigVariable(\$_smarty_tpl, $_index[1])";
} }
case 'ldelim': case 'ldelim':
$_ldelim = $compiler->smarty->left_delimiter; return "\$_smarty_tpl->smarty->left_delimiter";
return "'$_ldelim'";
case 'rdelim': case 'rdelim':
$_rdelim = $compiler->smarty->right_delimiter; return "\$_smarty_tpl->smarty->right_delimiter";
return "'$_rdelim'";
default: default:
$compiler->trigger_template_error('$smarty.' . trim($_index[ 0 ], "'") . ' is invalid'); $compiler->trigger_template_error('$smarty.' . trim($_index[ 0 ], "'") . ' is not defined');
break; break;
} }
if (isset($_index[ 1 ])) { if (isset($_index[ 1 ])) {