From 3642fc0e5316b48a3df10cbe56b09ee449e32784 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 30 Jun 2023 13:25:27 +0800 Subject: [PATCH] * Move isCacheEnabled function to base dir. --- framework/api/helper.class.php | 13 ------------- framework/base/helper.class.php | 13 +++++++++++++ framework/helper.class.php | 13 ------------- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/framework/api/helper.class.php b/framework/api/helper.class.php index 9b2b175e35..f24358735e 100644 --- a/framework/api/helper.class.php +++ b/framework/api/helper.class.php @@ -214,19 +214,6 @@ class helper extends baseHelper } return common::getSysURL() . $link; } - - /** - * 检查是否启用缓存。 - * Check is enable cache. - * - * @return bool - */ - public static function isCacheEnabled() - { - if(isset($_GET['_nocache']) || isset($_SERVER['HTTP_X_ZT_REFRESH'])) return false; - global $config; - return $config->cache->enable; - } } /** diff --git a/framework/base/helper.class.php b/framework/base/helper.class.php index 76d640ea61..e8fb36f49d 100644 --- a/framework/base/helper.class.php +++ b/framework/base/helper.class.php @@ -787,6 +787,19 @@ class baseHelper return null; } + + /** + * 检查是否启用缓存。 + * Check is enable cache. + * + * @return bool + */ + public static function isCacheEnabled() + { + if(isset($_GET['_nocache']) || isset($_SERVER['HTTP_X_ZT_REFRESH'])) return false; + global $config; + return $config->cache->enable; + } } //------------------------------- 常用函数。Some tool functions.-------------------------------// diff --git a/framework/helper.class.php b/framework/helper.class.php index b3d0e6db71..1147271e04 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -359,19 +359,6 @@ class helper extends baseHelper { return !defined('USE_INTRANET') ? false : USE_INTRANET; } - - /** - * 检查是否启用缓存。 - * Check is enable cache. - * - * @return bool - */ - public static function isCacheEnabled() - { - if(isset($_GET['_nocache']) || isset($_SERVER['HTTP_X_ZT_REFRESH'])) return false; - global $config; - return $config->cache->enable; - } } /**