From fa95ad0c6944e81b52337b3884aa5f412549af7c Mon Sep 17 00:00:00 2001 From: munjoob <35959208+munjoob@users.noreply.github.com> Date: Wed, 12 Dec 2018 19:28:43 +0000 Subject: [PATCH 1/3] Update functions.php --- includes/functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index d63218b..5d5f744 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -495,7 +495,8 @@ function fetch_remote_file($url, $save_in = false, $timeout = 20, $head_only = f function delete_cache($name, $all=false) { #Those files are exceptions and not for deletion - $exceptions = array('.htaccess', 'index.html', 'php.ini', 'web.config'); + global $except; + $exceptions = empty($except) ? array('.htaccess', 'index.html', 'php.ini', 'web.config'):$except; is_array($plugin_run_result = Plugins::getInstance()->run('delete_cache_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook @@ -1692,4 +1693,4 @@ function remove_from_htaccess($unique_id) return true; -} \ No newline at end of file +} From 66d73ab26a97a78bdddafff27e7f99f3a5d5bf22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdulrahman=20=E2=98=95=EF=B8=8F?= Date: Thu, 13 Dec 2018 00:17:58 +0300 Subject: [PATCH 2/3] Update functions.php --- includes/functions.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 5d5f744..3263708 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -494,11 +494,17 @@ function fetch_remote_file($url, $save_in = false, $timeout = 20, $head_only = f */ function delete_cache($name, $all=false) { - #Those files are exceptions and not for deletion - global $except; - $exceptions = empty($except) ? array('.htaccess', 'index.html', 'php.ini', 'web.config'):$except; - is_array($plugin_run_result = Plugins::getInstance()->run('delete_cache_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook + #Those files are exceptions and not for deletion + $exceptions = array('.htaccess', 'index.html', 'php.ini', 'web.config'); + + #ignore kleeja.log in dev stage. + if(defined('DEV_STAGE')) + { + array_push($exceptions, 'kleeja_log.log'); + } + + is_array($plugin_run_result = Plugins::getInstance()->run('delete_cache_func', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook //handle array of cached files if(is_array($name)) From a884a0c1c63a741d07932c4c495fe04c16f5266f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abdulrahman=20=E2=98=95=EF=B8=8F?= Date: Thu, 13 Dec 2018 00:18:54 +0300 Subject: [PATCH 3/3] Update functions.php --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 3263708..a6ca14f 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -498,7 +498,7 @@ function delete_cache($name, $all=false) #Those files are exceptions and not for deletion $exceptions = array('.htaccess', 'index.html', 'php.ini', 'web.config'); - #ignore kleeja.log in dev stage. + #ignore kleeja_log in dev stage. if(defined('DEV_STAGE')) { array_push($exceptions, 'kleeja_log.log');