- bugfix clearXxx() change of 27.1.2014 did not work when specifing cache_id or compile_id (forum topic 24868 and 24867)

This commit is contained in:
Uwe.Tews@googlemail.com
2014-03-13 20:32:39 +00:00
parent 40acefe91b
commit 3d4d35f4d7
3 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== 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 ===== ===== 3.1.17 =====
08.03.2014 08.03.2014
- bugfix relative file path {include} within {block} of child templates did throw exception on first call (Issue 177) - bugfix relative file path {include} within {block} of child templates did throw exception on first call (Issue 177)

View File

@@ -139,7 +139,7 @@
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
$_dir_sep = $smarty->use_sub_dirs ? '/' : '^'; $_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
$_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0; $_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0;
$_dir = realpath($smarty->getCacheDir()); $_dir = realpath($smarty->getCacheDir()) . '/';
$_dir_length = strlen($_dir); $_dir_length = strlen($_dir);
if (isset($_cache_id)) { if (isset($_cache_id)) {
$_cache_id_parts = explode('|', $_cache_id); $_cache_id_parts = explode('|', $_cache_id);

View File

@@ -182,7 +182,7 @@ class Smarty_Internal_Utility
*/ */
public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty) 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; $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
$_dir_sep = $smarty->use_sub_dirs ? DS : '^'; $_dir_sep = $smarty->use_sub_dirs ? DS : '^';
if (isset($resource_name)) { if (isset($resource_name)) {