From aa730800bdd87cf05f89936d7b15e3ae857966de Mon Sep 17 00:00:00 2001 From: uwetews Date: Mon, 2 Nov 2015 18:06:42 +0100 Subject: [PATCH] - bugfix {include} with variable file name like {include file="foo_`$bar`.tpl"} did fail in 3.1.28-dev https://github.com/smarty-php/smarty/issues/102 --- change_log.txt | 3 +++ libs/Smarty.class.php | 2 +- libs/sysplugins/smarty_internal_compile_include.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 36f1749f..5488c230 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.28-dev===== (xx.xx.2015) + 02.11.2015 + - bugfix {include} with variable file name like {include file="foo_`$bar`.tpl"} did fail in 3.1.28-dev https://github.com/smarty-php/smarty/issues/102 + 01.11.2015 - update config file processing diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 6ad1f789..ac09d0a4 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.28-dev/76'; + const SMARTY_VERSION = '3.1.28-dev/77'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 26820947..90343f09 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -97,7 +97,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase } else { $compiled->includes[$fullResourceName] = 1; } - $fullResourceName = "'{$fullResourceName}'"; + $fullResourceName = '"' . $fullResourceName . '"'; } } if (empty($match[5])) {