- fixed problem with directory setter methodes

This commit is contained in:
Uwe.Tews
2009-04-29 17:56:56 +00:00
parent 4c794a3d70
commit d7093433ae
4 changed files with 34 additions and 29 deletions

View File

@@ -47,22 +47,22 @@ class Smarty_Internal_Compile_Extend extends Smarty_Internal_CompileBase {
$this->compiler->trigger_template_error("\"" . $matches[0] . "\" missing name attribute");
} else {
// compile block content
$tpl = $this->smarty->createTemplate('string:' . $matches[3]);
$tpl->suppressHeader = true;
$compiled_content = $tpl->getCompiledTemplate();
$tpl->suppressHeader = false;
$_tpl = $this->smarty->createTemplate('string:' . $matches[3]);
$_tpl->suppressHeader = true;
$_compiled_content = $_tpl->getCompiledTemplate();
unset($_tpl);
$_name = trim($_match[3], "\"'");
if (isset($this->compiler->template->block_data[$_name])) {
if ($this->compiler->template->block_data[$_name]['mode'] == 'prepend') {
$this->compiler->template->block_data[$_name]['compiled'] .= $compiled_content;
$this->compiler->template->block_data[$_name]['compiled'] .= $_compiled_content;
$this->compiler->template->block_data[$_name]['source'] .= $matches[3];
} elseif ($this->compiler->template->block_data[$_name]['mode'] == 'append') {
$this->compiler->template->block_data[$_name]['compiled'] = $compiled_content . $this->compiler->template->block_data[$_name]['compiled'];
$this->compiler->template->block_data[$_name]['compiled'] = $_compiled_content . $this->compiler->template->block_data[$_name]['compiled'];
$this->compiler->template->block_data[$_name]['source'] = $matches[3] . $this->compiler->template->block_data[$_name]['source'];
}
} else {
$this->compiler->template->block_data[$_name]['compiled'] = $compiled_content;
$this->compiler->template->block_data[$_name]['compiled'] = $_compiled_content;
$this->compiler->template->block_data[$_name]['source'] = $matches[3];
}
// if (isset($this->compiler->template->block_data[$_name]['mode'])) {