mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 19:54:14 +02:00
- bugfix nested block tags in template inheritance child templates did not work correctly
- bugfix {$smarty.current_dir} in child template did not point to dir of child template
This commit is contained in:
@@ -56,21 +56,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
|
||||
break;
|
||||
|
||||
case 'template':
|
||||
if ($compiler->smarty->inheritance) {
|
||||
$ptr = $compiler->template->parent;
|
||||
} else {
|
||||
$ptr = $compiler->template;
|
||||
}
|
||||
$_template_name = $ptr->template_resource;
|
||||
$_template_name = $compiler->template->template_resource;
|
||||
return "'$_template_name'";
|
||||
|
||||
case 'current_dir':
|
||||
if ($compiler->smarty->inheritance) {
|
||||
$ptr = $compiler->template->parent;
|
||||
} else {
|
||||
$ptr = $compiler->template;
|
||||
}
|
||||
$_template_dir_name = dirname($ptr->getTemplateFilepath());
|
||||
$_template_dir_name = dirname($compiler->template->getTemplateFilepath());
|
||||
return "'$_template_dir_name'";
|
||||
|
||||
case 'version':
|
||||
|
||||
Reference in New Issue
Block a user