mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 11:24:27 +02:00
- bugfix on special Smarty variable $smarty.cookies
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
01/14/2010
|
01/14/2010
|
||||||
- bugfix on backslash within single quoted strings
|
- bugfix on backslash within single quoted strings
|
||||||
- bugfix allow absolute filepath for config files
|
- bugfix allow absolute filepath for config files
|
||||||
|
- bugfix on special Smarty variable $smarty.cookies
|
||||||
|
|
||||||
01/13/2010
|
01/13/2010
|
||||||
- bugfix on {if} tags
|
- bugfix on {if} tags
|
||||||
|
@@ -33,10 +33,16 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
|||||||
return "\$_smarty_tpl->smarty->_smarty_vars$args";
|
return "\$_smarty_tpl->smarty->_smarty_vars$args";
|
||||||
case 'now':
|
case 'now':
|
||||||
return 'time()';
|
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 'get':
|
||||||
case 'post':
|
case 'post':
|
||||||
case 'cookies':
|
|
||||||
case 'env':
|
case 'env':
|
||||||
case 'server':
|
case 'server':
|
||||||
case 'session':
|
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");
|
$compiler->trigger_template_error("(secure mode) super globals not permitted");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$compiled_ref = "\$_".strtoupper($variable);
|
$compiled_ref = '$_'.strtoupper($variable);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'template':
|
case 'template':
|
||||||
|
Reference in New Issue
Block a user