From 3d4d35f4d725a94f5f3186aed11dc25b4fe93de3 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Thu, 13 Mar 2014 20:32:39 +0000 Subject: [PATCH] - bugfix clearXxx() change of 27.1.2014 did not work when specifing cache_id or compile_id (forum topic 24868 and 24867) --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_cacheresource_file.php | 2 +- libs/sysplugins/smarty_internal_utility.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/change_log.txt b/change_log.txt index 64fd1f87..c80eaeb3 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@ ===== trunk ===== + 13.03.2014 + - bugfix clearXxx() change of 27.1.2014 did not work when specifing cache_id or compile_id (forum topic 24868 and 24867) + ===== 3.1.17 ===== 08.03.2014 - bugfix relative file path {include} within {block} of child templates did throw exception on first call (Issue 177) diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php index ad728340..1b51d8ce 100644 --- a/libs/sysplugins/smarty_internal_cacheresource_file.php +++ b/libs/sysplugins/smarty_internal_cacheresource_file.php @@ -139,7 +139,7 @@ $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; $_dir_sep = $smarty->use_sub_dirs ? '/' : '^'; $_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0; - $_dir = realpath($smarty->getCacheDir()); + $_dir = realpath($smarty->getCacheDir()) . '/'; $_dir_length = strlen($_dir); if (isset($_cache_id)) { $_cache_id_parts = explode('|', $_cache_id); diff --git a/libs/sysplugins/smarty_internal_utility.php b/libs/sysplugins/smarty_internal_utility.php index 55509ded..5bd881cb 100644 --- a/libs/sysplugins/smarty_internal_utility.php +++ b/libs/sysplugins/smarty_internal_utility.php @@ -182,7 +182,7 @@ class Smarty_Internal_Utility */ public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty) { - $_compile_dir = realpath($smarty->getCompileDir()); + $_compile_dir = realpath($smarty->getCompileDir()).'/'; $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; $_dir_sep = $smarty->use_sub_dirs ? DS : '^'; if (isset($resource_name)) {