mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-03 22:01:36 +01:00 
			
		
		
		
	- bugfix update of 04.08.2016 was incomplete
This commit is contained in:
		@@ -35,16 +35,10 @@ class Smarty_Internal_Runtime_CodeFrame
 | 
			
		||||
            $properties[ 'has_nocache_code' ] = $_template->compiled->has_nocache_code;
 | 
			
		||||
            $properties[ 'file_dependency' ] = $_template->compiled->file_dependency;
 | 
			
		||||
            $properties[ 'includes' ] = $_template->compiled->includes;
 | 
			
		||||
            if (!empty($compiler->tpl_function)) {
 | 
			
		||||
                $properties[ 'tpl_function' ] = $compiler->tpl_function;
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
         } else {
 | 
			
		||||
            $properties[ 'has_nocache_code' ] = $_template->cached->has_nocache_code;
 | 
			
		||||
            $properties[ 'file_dependency' ] = $_template->cached->file_dependency;
 | 
			
		||||
            $properties[ 'cache_lifetime' ] = $_template->cache_lifetime;
 | 
			
		||||
            if (!empty($_template->tpl_function)) {
 | 
			
		||||
                $properties[ 'tpl_function' ] = $_template->tpl_function;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        $output = "<?php\n";
 | 
			
		||||
        $output .= "/* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") .
 | 
			
		||||
@@ -54,6 +48,15 @@ class Smarty_Internal_Runtime_CodeFrame
 | 
			
		||||
               ($cache ? 'true' : 'false') . ")";
 | 
			
		||||
        $output .= "if ({$dec}) {\n";
 | 
			
		||||
        $output .= "function {$properties['unifunc']} (Smarty_Internal_Template \$_smarty_tpl) {\n";
 | 
			
		||||
        if (!$cache && !empty($compiler->tpl_function)) {
 | 
			
		||||
            $output .= "\$_smarty_tpl->ext->_tplFunction->registerTplFunctions(\$_smarty_tpl, " .
 | 
			
		||||
                       var_export($compiler->tpl_function, true) . ");\n";
 | 
			
		||||
        }
 | 
			
		||||
        if ($cache && isset($_template->ext->_tplFunction)) {
 | 
			
		||||
            $output .= "\$_smarty_tpl->ext->_tplFunction->registerTplFunctions(\$_smarty_tpl, " .
 | 
			
		||||
                       var_export($_template->ext->_tplFunction->getTplFunction(), true) . ");\n";
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        // include code for plugins
 | 
			
		||||
        if (!$cache) {
 | 
			
		||||
            if (!empty($_template->compiled->required_plugins[ 'compiled' ])) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user