mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 19:04:27 +02:00
-bugfix {assign} in a nocache section should not overwrite existing variable values
during compilation (issue 109)
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
30.07.2012
|
||||||
|
-bugfix {assign} in a nocache section should not overwrite existing variable values
|
||||||
|
during compilation (issue 109)
|
||||||
|
|
||||||
28.07.2012
|
28.07.2012
|
||||||
- bugfix array access of config variables did not work (Forum Topic 22527)
|
- bugfix array access of config variables did not work (Forum Topic 22527)
|
||||||
|
|
||||||
|
@@ -39,8 +39,12 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {
|
|||||||
if ($compiler->tag_nocache || $compiler->nocache) {
|
if ($compiler->tag_nocache || $compiler->nocache) {
|
||||||
$_nocache = 'true';
|
$_nocache = 'true';
|
||||||
// create nocache var to make it know for further compiling
|
// create nocache var to make it know for further compiling
|
||||||
|
if (isset($compiler->template->tpl_vars[trim($_attr['var'], "'")])) {
|
||||||
|
$compiler->template->tpl_vars[trim($_attr['var'], "'")]->nocache = true;
|
||||||
|
} else {
|
||||||
$compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true);
|
$compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// scope setup
|
// scope setup
|
||||||
if (isset($_attr['scope'])) {
|
if (isset($_attr['scope'])) {
|
||||||
$_attr['scope'] = trim($_attr['scope'], "'\"");
|
$_attr['scope'] = trim($_attr['scope'], "'\"");
|
||||||
|
Reference in New Issue
Block a user