diff --git a/modules/opage/opage.admin.controller.php b/modules/opage/opage.admin.controller.php index 533487ca5..1bf5ad0bb 100644 --- a/modules/opage/opage.admin.controller.php +++ b/modules/opage/opage.admin.controller.php @@ -70,7 +70,7 @@ $oModuleController->updateModuleGrant($module_info->module_srl, $grants); // 캐시 파일 삭제 - $cache_file = sprintf("./files/cache/opage/%d.cache", $module_info->module_srl); + $cache_file = sprintf("./files/cache/opage/%d.cache.php", $module_info->module_srl); if(file_exists($cache_file)) @unlink($cache_file); // 등록 성공후 return될 메세지 정리 diff --git a/modules/opage/opage.view.php b/modules/opage/opage.view.php index 14dd74fa5..a74349507 100644 --- a/modules/opage/opage.view.php +++ b/modules/opage/opage.view.php @@ -91,15 +91,28 @@ * @brief 내부 파일일 경우 include하도록 캐시파일을 만들고 처리 **/ function executeFile($path, $caching_interval, $cache_file) { + // 파일이 없으면 취소 + if(!file_exists($path)) return; + + // 경로와 파일이름을 구함 + $tmp_path = explode('/',$cache_file); + $filename = $tmp_path[count($tmp_path)-1]; + $filepath = ereg_replace($filename."$","",$cache_file); // 캐시 검사 - if($caching_interval <1 || !file_exists($cache_file) || filemtime($cache_file) + $caching_interval*60 <= time()) { + if($caching_interval <1 || !file_exists($cache_file) || filemtime($cache_file) + $caching_interval*60 <= time() || filemtime($cache_file)tpl_path = $filepath; + if($_SESSION['is_logged']) $__Context->logged_info = $_SESSION['logged_info']; + + ob_start(); + @include($cache_file); + $content = ob_get_contents(); + ob_end_clean(); return $content; }