From dbfb9b34fbb793659b8f82e7d0ffc2413865dd0e Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 28 Sep 2007 04:53:48 +0000 Subject: [PATCH] =?UTF-8?q?=EC=99=B8=EB=B6=80=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=20=EB=AA=A8=EB=93=88=EC=9D=98=20=EC=BA=90=EC=8B=9C=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9E=90=EB=8F=99=20=EC=82=AD=EC=A0=9C=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20=EC=A0=95=EC=83=81=EC=A0=81=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95=20+=20=EC=84=9C=EB=B2=84?= =?UTF-8?q?=EB=82=B4=20=ED=8C=8C=EC=9D=BC=20include=EC=8B=9C=20=EB=8C=80?= =?UTF-8?q?=EC=83=81=20=ED=8C=8C=EC=9D=BC=EC=9D=98=20include=EA=B9=8C?= =?UTF-8?q?=EC=A7=80=20=EB=AA=A8=EB=91=90=20=EC=B2=98=EB=A6=AC=ED=9B=84=20?= =?UTF-8?q?=EC=A0=9C=EB=A1=9C=EB=B3=B4=EB=93=9CXE=EC=9D=98=20=ED=85=9C?= =?UTF-8?q?=ED=94=8C=EB=A6=BF=20=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EB=8F=84=EB=A1=9D=20=EA=B8=B0=EB=8A=A5=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2647 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/opage/opage.admin.controller.php | 2 +- modules/opage/opage.view.php | 38 ++++++++++++++++-------- 2 files changed, 27 insertions(+), 13 deletions(-) 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; }