diff --git a/change_log.txt b/change_log.txt index 602f3f72..8a43524c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,8 @@ ===== 3.1.31-dev ===== (xx.xx.xx) + 12.10.2016 + - bugfix {include} with template names including variable or constants could fail after bugfix from + 28.09.2016 https://github.com/smarty-php/smarty/issues/302 + 08.10.2016 - optimization move runtime extension for template functions into Smarty objects diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index a9af2d8e..68fcd04d 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -114,7 +114,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.31-dev/33'; + const SMARTY_VERSION = '3.1.31-dev/34'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 9751e517..a81b0c74 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -107,7 +107,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase $compiled->includes[ $fullResourceName ] = 1; } } - $fullResourceName = "'" . $fullResourceName . "'"; + $fullResourceName = $match[ 1 ] . $fullResourceName . $match[ 1 ]; } } if (empty($match[ 5 ])) { @@ -295,8 +295,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase { $uid = $tpl->source->type . $tpl->source->uid; if (!($tpl->source->handler->uncompiled) && $tpl->source->exists) { - $compiler->parent_compiler->mergedSubTemplatesData[ $uid ][ $t_hash ][ 'uid' ] = - $tpl->source->uid; + $compiler->parent_compiler->mergedSubTemplatesData[ $uid ][ $t_hash ][ 'uid' ] = $tpl->source->uid; if (isset($compiler->template->inheritance)) { $tpl->inheritance = clone $compiler->template->inheritance; }