diff options
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php index ba39717fd..6f63dcb17 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php +++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php @@ -17,6 +17,13 @@ class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase { /** + * Array of names of valid option flags + * + * @var array + */ + public $option_flags = array(); + + /** * Compiles code for the {nocache} tag * This tag does not generate compiled output. It only sets a compiler flag. * @@ -28,9 +35,7 @@ class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase public function compile($args, $compiler) { $_attr = $this->getAttributes($compiler, $args); - if ($_attr['nocache'] === true) { - $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno); - } + $this->openTag($compiler, 'nocache', array($compiler->nocache)); // enter nocache mode $compiler->nocache = true; // this tag does not return compiled code @@ -61,7 +66,7 @@ class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase { $_attr = $this->getAttributes($compiler, $args); // leave nocache mode - $compiler->nocache = false; + list($compiler->nocache) = $this->closeTag($compiler, array('nocache')); // this tag does not return compiled code $compiler->has_code = false; |