* Move isCacheEnabled function to base dir.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.-------------------------------//
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user