mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#121. zbxe코드내에서 사용되는 모든 filectime()을 filemtime()으로 변경하여 윈도우에서도 캐시에 대한 유효처리가 이상없도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2445 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
13c9711400
commit
150f8ede43
10 changed files with 12 additions and 12 deletions
|
|
@ -205,7 +205,7 @@
|
|||
$cache_file = sprintf('%s%s.cache.php', $this->cache_file, $query_id);
|
||||
|
||||
// 없으면 원본 쿼리 xml파일을 찾아서 파싱을 한다
|
||||
if(!file_exists($cache_file)||filectime($cache_file)<filectime($xml_file)) {
|
||||
if(!file_exists($cache_file)||filemtime($cache_file)<filemtime($xml_file)) {
|
||||
require_once('./classes/xml/XmlQueryParser.class.php');
|
||||
$oParser = new XmlQueryParser();
|
||||
$oParser->parse($query_id, $xml_file, $cache_file);
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
function _compile($tpl_file, $compiled_tpl_file) {
|
||||
if(!file_exists($compiled_tpl_file)) return $this->_compileTplFile($tpl_file, $compiled_tpl_file);
|
||||
|
||||
$source_ftime = filectime($tpl_file);
|
||||
$target_ftime = filectime($compiled_tpl_file);
|
||||
$source_ftime = filemtime($tpl_file);
|
||||
$target_ftime = filemtime($compiled_tpl_file);
|
||||
if($source_ftime>$target_ftime) return $this->_compileTplFile($tpl_file, $compiled_tpl_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
$cache_file = sprintf('%s%d.%s.cache', $cache_path, $sequence, Context::getLangType());
|
||||
if(!file_exists($cache_file)) return;
|
||||
|
||||
$filectime = filectime($cache_file);
|
||||
if($filectime + $cache*60 < time()) return;
|
||||
$filemtime= filemtime($cache_file);
|
||||
if($filemtime + $cache*60 < time()) return;
|
||||
|
||||
$output = FileHandler::readFile($cache_file);
|
||||
return $output;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
function compile() {
|
||||
if(!file_exists($this->xml_file)) return;
|
||||
if(!file_exists($this->js_file)) $this->_compile();
|
||||
else if(filectime($this->xml_file)>filectime($this->js_file)) $this->_compile();
|
||||
else if(filemtime($this->xml_file)>filemtime($this->js_file)) $this->_compile();
|
||||
Context::addJsFile($this->js_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
$cache_file = sprintf("./files/cache/newest_news.%s.cache.php", Context::getLangType());
|
||||
|
||||
// 1시간 단위로 캐싱 체크
|
||||
if(!file_exists($cache_file) || filectime($cache_file)+ 60*60 < time()) {
|
||||
if(!file_exists($cache_file) || filemtime($cache_file)+ 60*60 < time()) {
|
||||
FileHandler::getRemoteFile($newest_news_url, $cache_file);
|
||||
}
|
||||
if(file_exists($cache_file)) {
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@
|
|||
|
||||
// 썸네일이 있더라도 글의 수정시간과 비교해서 다르면 다시 생성함
|
||||
if(file_exists($thumbnail_file)) {
|
||||
$file_created_time = date("YmdHis",filectime($thumbnail_file));
|
||||
$file_created_time = date("YmdHis",filemtime($thumbnail_file));
|
||||
$modified_time = $this->get('last_update');
|
||||
if($modified_time > $file_created_time) @unlink($thumbnail_file);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@
|
|||
$cache_file = sprintf('./files/cache/editor/%s.%s.php', $component, $lang_type);
|
||||
|
||||
// 캐시된 xml파일이 있으면 include 후 정보 return
|
||||
if(file_exists($cache_file) && file_exists($xml_file) && filectime($cache_file) > filectime($xml_file)) {
|
||||
if(file_exists($cache_file) && file_exists($xml_file) && filemtime($cache_file) > filemtime($xml_file)) {
|
||||
include($cache_file);
|
||||
return $xml_info;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
if(!$layout_srl) $cache_file = sprintf('./files/cache/layout/%s.%s.cache.php', $layout, Context::getLangType());
|
||||
else $cache_file = sprintf('./files/cache/layout/%s.%s.cache.php', $layout_srl, Context::getLangType());
|
||||
|
||||
if(file_exists($cache_file)&&filectime($cache_file)>filectime($xml_file)) {
|
||||
if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file)) {
|
||||
@include($cache_file);
|
||||
|
||||
if($layout_info->extra_var && $vars) {
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@
|
|||
$cache_file = sprintf("./files/cache/module_info/%s.%s.php", $module, Context::getLangType());
|
||||
|
||||
// 캐시 파일이 없거나 캐시 파일이 xml 파일보다 오래되었으면 내용 다시 갱신
|
||||
if(!file_exists($cache_file) || filectime($cache_file)<filectime($xml_file)) {
|
||||
if(!file_exists($cache_file) || filemtime($cache_file)<filemtime($xml_file)) {
|
||||
|
||||
$buff = ""; ///< 캐시 파일에 쓸 buff 변수 설정
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
// cache 파일을 비교하여 문제 없으면 include하고 $widget_info 변수를 return
|
||||
$cache_file = sprintf('./files/cache/widget/%s.%s.cache.php', $widget, Context::getLangType());
|
||||
|
||||
if(file_exists($cache_file)&&filectime($cache_file)>filectime($xml_file)) {
|
||||
if(file_exists($cache_file)&&filemtime($cache_file)>filemtime($xml_file)) {
|
||||
@include($cache_file);
|
||||
return $widget_info;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue