mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
관리자 페이지 접속시 서버에서 받아노는 뉴스정보를 네트웍 문제로 받아오지 못할때를 가정하여 news cache파일의 modified time을 갱신, 페이지 refresh시에 다시 뉴스를 받기 위해 재시도 하지 않도록 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6608 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c053f0a4a4
commit
55828703b8
1 changed files with 3 additions and 0 deletions
|
|
@ -92,6 +92,9 @@
|
|||
$newest_news_url = sprintf("http://news.xpressengine.com/%s/news.php", Context::getLangType());
|
||||
$cache_file = sprintf("%sfiles/cache/newest_news.%s.cache.php", _XE_PATH_,Context::getLangType());
|
||||
if(!file_exists($cache_file) || filemtime($cache_file)+ 60*60 < time()) {
|
||||
// 네트웍 상태로 데이터를 가져오지 못할 상황을 고려해 일단 filemtime을 변경하여 관리자 페이지 refresh시에 다시 읽ㅇ 오지 않도록 함
|
||||
// 뉴스를 보지는 못하지만 관리자 페이지 접속은 이상없도록 함
|
||||
FileHandler::writeFile($cache_file,'');
|
||||
FileHandler::getRemoteFile($newest_news_url, $cache_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue