- added global variable scope SMARTY_GLOBAL_SCOPE

- enable 'variable' filter by default
This commit is contained in:
Uwe.Tews
2009-04-10 12:33:51 +00:00
parent 33082844a5
commit eace27e2b6
10 changed files with 521 additions and 540 deletions

View File

@@ -41,7 +41,13 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {
$_attr = $this->_get_attributes($args);
if (isset($_attr['scope'])) {
$_scope = trim($_attr['scope'],'\'');
if ($_attr['scope'] == '\'parent\'') {
$_scope = SMARTY_PARENT_SCOPE;
} elseif ($_attr['scope'] == '\'root\'') {
$_scope = SMARTY_ROOT_SCOPE;
} elseif ($_attr['scope'] == '\'global\'') {
$_scope = SMARTY_GLOBAL_SCOPE;
}
}
if (isset($_attr['index'])) {