mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
- fixed problem with directory setter methodes
This commit is contained in:
@@ -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'])) {
|
||||
|
||||
Reference in New Issue
Block a user