- 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
This commit is contained in:
uwetews
2016-10-12 01:02:54 +02:00
parent 3c07a28434
commit f3e0e01266
3 changed files with 7 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}