diff options
Diffstat (limited to 'vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_shared_inheritance.php')
-rw-r--r-- | vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_shared_inheritance.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_shared_inheritance.php b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_shared_inheritance.php index a32173cd6..d90262e60 100644 --- a/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_shared_inheritance.php +++ b/vendor/smarty/smarty/libs/sysplugins/smarty_internal_compile_shared_inheritance.php @@ -22,7 +22,7 @@ class Smarty_Internal_Compile_Shared_Inheritance extends Smarty_Internal_Compile * @param \Smarty_Internal_TemplateCompilerBase $compiler * @param bool|false $initChildSequence if true force child template */ - static function postCompile(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false) + public static function postCompile(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false) { $compiler->prefixCompiledCode .= "<?php \$_smarty_tpl->_loadInheritance();\n\$_smarty_tpl->inheritance->init(\$_smarty_tpl, " . var_export($initChildSequence, true) . ");\n?>\n"; @@ -36,13 +36,14 @@ class Smarty_Internal_Compile_Shared_Inheritance extends Smarty_Internal_Compile */ public function registerInit(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false) { - if ($initChildSequence || !isset($compiler->_cache['inheritanceInit'])) { - $compiler->registerPostCompileCallback(array('Smarty_Internal_Compile_Shared_Inheritance', 'postCompile'), - array($initChildSequence), - 'inheritanceInit', - $initChildSequence); - - $compiler->_cache['inheritanceInit'] = true; + if ($initChildSequence || !isset($compiler->_cache[ 'inheritanceInit' ])) { + $compiler->registerPostCompileCallback( + array('Smarty_Internal_Compile_Shared_Inheritance', 'postCompile'), + array($initChildSequence), + 'inheritanceInit', + $initChildSequence + ); + $compiler->_cache[ 'inheritanceInit' ] = true; } } -}
\ No newline at end of file +} |