smarty 3.1.8 releases - see changelog
This commit is contained in:
@@ -176,20 +176,24 @@ abstract class Smarty_Internal_TemplateCompilerBase {
|
||||
self::$_tag_objects = array();
|
||||
// return compiled code to template object
|
||||
$merged_code = '';
|
||||
if (!$this->suppressMergedTemplates) {
|
||||
if (!$this->suppressMergedTemplates && !empty($this->merged_templates)) {
|
||||
foreach ($this->merged_templates as $code) {
|
||||
$merged_code .= $code;
|
||||
}
|
||||
// run postfilter if required on merged code
|
||||
if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
|
||||
$merged_code = Smarty_Internal_Filter_Handler::runFilter('post', $merged_code, $template);
|
||||
}
|
||||
}
|
||||
// run postfilter if required on compiled template code
|
||||
if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
|
||||
$_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);
|
||||
}
|
||||
if ($this->suppressTemplatePropertyHeader) {
|
||||
$code = $_compiled_code . $merged_code;
|
||||
} else {
|
||||
$code = $template_header . $template->createTemplateCodeFrame($_compiled_code) . $merged_code;
|
||||
}
|
||||
// run postfilter if required
|
||||
if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
|
||||
$code = Smarty_Internal_Filter_Handler::runFilter('post', $code, $template);
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
||||
@@ -505,11 +509,13 @@ abstract class Smarty_Internal_TemplateCompilerBase {
|
||||
{
|
||||
$callback = null;
|
||||
$script = null;
|
||||
$cacheable = true;
|
||||
$result = call_user_func_array(
|
||||
$this->smarty->default_plugin_handler_func,
|
||||
array($tag, $plugin_type, $this->template, &$callback, &$script)
|
||||
array($tag, $plugin_type, $this->template, &$callback, &$script, &$cacheable)
|
||||
);
|
||||
if ($result) {
|
||||
$this->tag_nocache = $this->tag_nocache || !$cacheable;
|
||||
if ($script !== null) {
|
||||
if (is_file($script)) {
|
||||
if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
|
||||
@@ -557,7 +563,7 @@ abstract class Smarty_Internal_TemplateCompilerBase {
|
||||
($this->nocache || $this->tag_nocache || $this->forceNocache == 2)) {
|
||||
$this->template->has_nocache_code = true;
|
||||
$_output = str_replace("'", "\'", $content);
|
||||
$_output = str_replace('\\\\', '\\\\\\\\', $_output);
|
||||
$_output = str_replace('\\\\', '\\\\\\', $_output);
|
||||
$_output = str_replace("^#^", "'", $_output);
|
||||
$_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n";
|
||||
// make sure we include modifer plugins for nocache code
|
||||
|
Reference in New Issue
Block a user