- bugfix on clear_compiled_tpl (avoid possible warning)

This commit is contained in:
Uwe.Tews
2009-12-11 14:26:57 +00:00
parent 048fd5e274
commit 5219139f6b
2 changed files with 6 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
12/11/2009
- bugfix on clear_compiled_tpl (avoid possible warning)
12/10/2009 12/10/2009
- bugfix on {function} tags and template inheritance - bugfix on {function} tags and template inheritance

View File

@@ -46,9 +46,9 @@ function Smarty_Method_Clear_Compiled_Tpl($smarty, $resource_name = null, $comp
@rmdir($_file->getPathname()); @rmdir($_file->getPathname());
} }
} else { } else {
if ((!isset($_compile_id) || substr_compare((string)$_file, $_compile_id_part, 0, strlen($_compile_id_part)) == 0) && if ((!isset($_compile_id) || (strlen((string)$_file) > strlen($_compile_id_part) && substr_compare((string)$_file, $_compile_id_part, 0, strlen($_compile_id_part)) == 0)) &&
(!isset($resource_name) || substr_compare((string)$_file, $_resource_part_1, - strlen($_resource_part_1), strlen($_resource_part_1)) == 0 || (!isset($resource_name) || (strlen((string)$_file) > strlen($_resource_part_1) && substr_compare((string)$_file, $_resource_part_1, - strlen($_resource_part_1), strlen($_resource_part_1)) == 0) ||
substr_compare((string)$_file, $_resource_part_2, - strlen($_resource_part_2), strlen($_resource_part_2)) == 0)) { (strlen((string)$_file) > strlen($_resource_part_2) && substr_compare((string)$_file, $_resource_part_2, - strlen($_resource_part_2), strlen($_resource_part_2)) == 0))) {
if (isset($exp_time)) { if (isset($exp_time)) {
if (time() - @filemtime($_file) >= $exp_time) { if (time() - @filemtime($_file) >= $exp_time) {
$_count += @unlink((string) $_file) ? 1 : 0; $_count += @unlink((string) $_file) ? 1 : 0;