Skip to content

Commit

Permalink
- bugfix {include} with template names including variable or constant…
Browse files Browse the repository at this point in the history
…s could fail after bugfix from

     28.09.2016 #302
  • Loading branch information
uwetews committed Oct 11, 2016
1 parent 3c07a28 commit f3e0e01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion libs/Smarty.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions libs/sysplugins/smarty_internal_compile_include.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function compile($args, Smarty_Internal_SmartyTemplateCompiler $compiler,
$compiled->includes[ $fullResourceName ] = 1;
}
}
$fullResourceName = "'" . $fullResourceName . "'";
$fullResourceName = $match[ 1 ] . $fullResourceName . $match[ 1 ];
}
}
if (empty($match[ 5 ])) {
Expand Down Expand Up @@ -295,8 +295,7 @@ public function compileInlineTemplate(Smarty_Internal_SmartyTemplateCompiler $co
{
$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;
}
Expand Down

0 comments on commit f3e0e01

Please sign in to comment.