From fccd80818b71593517507bf1b030d076a1942f4c Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Mon, 14 Oct 2013 07:47:49 +0000 Subject: [PATCH] - bugfix yesterdays fix could result in an undefined variable --- change_log.txt | 3 +++ libs/sysplugins/smarty_resource.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/change_log.txt b/change_log.txt index ecf14adb..04e0dd6c 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== + 14.10.2013 + - bugfix yesterdays fix could result in an undefined variable + 13.10.2013 - bugfix variable names on {include} in template inheritance did unextepted error message (forum topic 24594) (Issue 161) .- bugfix relative includes with same name like {include './foo.tpl'} from different folder failed (forum topic 24590)(Issue 161) diff --git a/libs/sysplugins/smarty_resource.php b/libs/sysplugins/smarty_resource.php index 8a6ea11a..4c9e1595 100644 --- a/libs/sysplugins/smarty_resource.php +++ b/libs/sysplugins/smarty_resource.php @@ -532,6 +532,8 @@ abstract class Smarty_Resource $_file_is_dotted = $name[0] == '.' && ($name[1] == '.' || $name[1] == '/' || $name[1] == "\\"); if ($_template->parent instanceof Smarty_Internal_Template && $_file_is_dotted && ($_template->parent->source->type == 'file' || $_template->parent->source->type == 'extends')) { $name2 = dirname($_template->parent->source->filepath) . DS . $name; + } else { + $name2 = $name; } $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name2);