* Move isCacheEnabled function to base dir.

This commit is contained in:
caoyanyi
2023-06-30 13:25:27 +08:00
parent 5056cd960a
commit 3642fc0e53
3 changed files with 13 additions and 26 deletions
-13
View File
@@ -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;
}
}
/**
+13
View File
@@ -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.-------------------------------//
-13
View File
@@ -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;
}
}
/**