- bugfix on special Smarty variable $smarty.cookies

This commit is contained in:
Uwe.Tews
2010-01-14 19:12:14 +00:00
parent db2c655322
commit 13444e9781
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
01/14/2010
- bugfix on backslash within single quoted strings
- bugfix allow absolute filepath for config files
- bugfix on special Smarty variable $smarty.cookies
01/13/2010
- bugfix on {if} tags

View File

@@ -33,10 +33,16 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
return "\$_smarty_tpl->smarty->_smarty_vars$args";
case 'now':
return 'time()';
case 'cookies':
if ($compiler->smarty->security && !$compiler->smarty->security_policy->allow_super_globals) {
$compiler->trigger_template_error("(secure mode) super globals not permitted");
break;
}
$compiled_ref = '$_COOKIE';
break;
case 'get':
case 'post':
case 'cookies':
case 'env':
case 'server':
case 'session':
@@ -45,7 +51,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
$compiler->trigger_template_error("(secure mode) super globals not permitted");
break;
}
$compiled_ref = "\$_".strtoupper($variable);
$compiled_ref = '$_'.strtoupper($variable);
break;
case 'template':