From 04d982fd486129b44daf6f48996d08381a01dc20 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Mon, 26 Nov 2012 15:50:06 +0100 Subject: [PATCH] //clean Tools::clearCache() thanks to @alexsegura --- classes/Tools.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/classes/Tools.php b/classes/Tools.php index 84f47beaf..a3e8f1c10 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -2041,7 +2041,13 @@ FileETag INode MTime Size */ public static function clearCache($smarty, $tpl = false, $cache_id = null, $compile_id = null) { - return $smarty->clearAllCache(); + if (is_null($smarty)) + $smarty = Context::getContext()->smarty; + + if (!tpl && is_null(cache_id) && is_null(compile_id)) + return $smarty->clearAllCache(); + else + return $smarty->clearCache($template, $cache_id, $compile_id); } /**