mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
05.04.2013
|
||||||
|
- bugfix post filter must not run when compiling inheritance child blocks (Forum Topic 24094)
|
||||||
|
|
||||||
28.02.2013
|
28.02.2013
|
||||||
- bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)
|
- bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133)
|
||||||
- bugfix Compile ID gets nulled when compiling child blocks (Issue #134)
|
- bugfix Compile ID gets nulled when compiling child blocks (Issue #134)
|
||||||
@@ -11,7 +14,7 @@
|
|||||||
- enhancement allow to disable exception message escaping by SmartyException::$escape = false; (Issue #130)
|
- enhancement allow to disable exception message escaping by SmartyException::$escape = false; (Issue #130)
|
||||||
|
|
||||||
09.01.2013
|
09.01.2013
|
||||||
- bugfix compilation did fail when a prefilter did modify an {extends} tag (Forum Topic 23966)
|
- bugfix compilation did fail when a prefilter did modify an {extends} tag c
|
||||||
- bugfix template inheritance could fail if nested {block} tags in childs did contain {$smarty.block.child} (Issue #127)
|
- bugfix template inheritance could fail if nested {block} tags in childs did contain {$smarty.block.child} (Issue #127)
|
||||||
- bugfix template inheritance could fail if {block} tags in childs did have similar name as used plugins (Issue #128)
|
- bugfix template inheritance could fail if {block} tags in childs did have similar name as used plugins (Issue #128)
|
||||||
- added abstract method declaration doCompile() in Smarty_Internal_TemplateCompilerBase (Forum Topic 23969)
|
- added abstract method declaration doCompile() in Smarty_Internal_TemplateCompilerBase (Forum Topic 23969)
|
||||||
|
@@ -190,6 +190,7 @@ class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
|||||||
$_tpl->compiler->forceNocache = 1;
|
$_tpl->compiler->forceNocache = 1;
|
||||||
}
|
}
|
||||||
$_tpl->compiler->suppressHeader = true;
|
$_tpl->compiler->suppressHeader = true;
|
||||||
|
$_tpl->compiler->suppressFilter = true;
|
||||||
$_tpl->compiler->suppressTemplatePropertyHeader = true;
|
$_tpl->compiler->suppressTemplatePropertyHeader = true;
|
||||||
$_tpl->compiler->suppressMergedTemplates = true;
|
$_tpl->compiler->suppressMergedTemplates = true;
|
||||||
if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
|
if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
|
||||||
|
@@ -106,6 +106,12 @@ abstract class Smarty_Internal_TemplateCompilerBase {
|
|||||||
*/
|
*/
|
||||||
public $suppressTemplatePropertyHeader = false;
|
public $suppressTemplatePropertyHeader = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* suppress pre and post filter
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $suppressFilter = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* flag if compiled template file shall we written
|
* flag if compiled template file shall we written
|
||||||
* @var bool
|
* @var bool
|
||||||
@@ -184,7 +190,7 @@ abstract class Smarty_Internal_TemplateCompilerBase {
|
|||||||
// get template source
|
// get template source
|
||||||
$_content = $template->source->content;
|
$_content = $template->source->content;
|
||||||
// run prefilter if required
|
// run prefilter if required
|
||||||
if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) {
|
if ((isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) && !$this->suppressFilter) {
|
||||||
$_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template);
|
$_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template);
|
||||||
}
|
}
|
||||||
// on empty template just return header
|
// on empty template just return header
|
||||||
@@ -209,13 +215,9 @@ abstract class Smarty_Internal_TemplateCompilerBase {
|
|||||||
foreach ($this->merged_templates as $code) {
|
foreach ($this->merged_templates as $code) {
|
||||||
$merged_code .= $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
|
// run postfilter if required on compiled template code
|
||||||
if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
|
if ((isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) && !$this->suppressFilter) {
|
||||||
$_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);
|
$_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);
|
||||||
}
|
}
|
||||||
if ($this->suppressTemplatePropertyHeader) {
|
if ($this->suppressTemplatePropertyHeader) {
|
||||||
|
Reference in New Issue
Block a user