mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
- bugfix on file dependendcy at template inheritance
- bugfix on nocache code at template inheritance
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
01/07/2009
|
||||
- bugfix on file dependency at template inheritance
|
||||
- bugfix on nocache code at template inheritance
|
||||
|
||||
01/06/2009
|
||||
- fixed typo in smarty_internal_resource_registered
|
||||
- bugfix for custom delimiter at extends resource and {extends} tag
|
||||
|
@@ -64,6 +64,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
|
||||
$_name = trim($saved_data[0]['name'], "\"'");
|
||||
if (isset($this->smarty->block_data[$_name])) {
|
||||
$_tpl = $this->smarty->createTemplate('string:' . $this->smarty->block_data[$_name]['source'], null, null, $compiler->template);
|
||||
$_tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];
|
||||
$_tpl->template_filepath = $this->smarty->block_data[$_name]['file'];
|
||||
$_tpl->forceNocache = true;
|
||||
$_tpl->suppressHeader = true;
|
||||
|
@@ -443,7 +443,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
|
||||
}
|
||||
}
|
||||
$this->rendered_content = ob_get_clean();
|
||||
if (!$this->resource_object->isEvaluated) {
|
||||
if (!$this->resource_object->isEvaluated && empty($this->properties['file_dependency'][$this->templateUid])) {
|
||||
$this->properties['file_dependency'][$this->templateUid] = array($this->getTemplateFilepath(), $this->getTemplateTimestamp());
|
||||
}
|
||||
if ($this->parent instanceof Smarty_Template or $this->parent instanceof Smarty_Internal_Template) {
|
||||
|
@@ -39,7 +39,11 @@ class Smarty_Internal_TemplateCompilerBase {
|
||||
*/
|
||||
public function compileTemplate($template)
|
||||
{
|
||||
if (empty($template->properties['nocache_hash'])) {
|
||||
$template->properties['nocache_hash'] = $this->nocache_hash;
|
||||
} else {
|
||||
$this->nocache_hash = $template->properties['nocache_hash'];
|
||||
}
|
||||
/* here is where the compiling takes place. Smarty
|
||||
tags in the templates are replaces with PHP code,
|
||||
then written to compiled files. */
|
||||
|
Reference in New Issue
Block a user