- improvement internal compiler changes

This commit is contained in:
uwetews
2016-02-05 17:41:11 +01:00
parent 85eedd0c11
commit c1f34b1314
4 changed files with 92 additions and 5 deletions

View File

@@ -49,11 +49,11 @@ class Smarty_Internal_Runtime_CodeFrame
$output = "<?php\n";
$output .= "/* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") .
"\n from \"" . $_template->source->filepath . "\" */\n\n";
$output .= "/* @var Smarty_Internal_Template \$_smarty_tpl */\n";
$dec = "\$_smarty_tpl->_decodeProperties(\$_smarty_tpl, " . var_export($properties, true) . ',' .
($cache ? 'true' : 'false') . ")";
$output .= "if ({$dec}) {\n";
$output .= "function {$properties['unifunc']} (\$_smarty_tpl) {\n";
$output .= "function {$properties['unifunc']} (Smarty_Internal_Template \$_smarty_tpl) {\n";
// include code for plugins
if (!$cache) {
if (!empty($_template->compiled->required_plugins[ 'compiled' ])) {