diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index a2209f3ed..fd4521d7e 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -117,6 +117,14 @@ @rmdir($path); } + /** + * @biref 지정된 디렉토리를 제외한 모든 파일을 삭제 + **/ + function removeFilesInDir($path) { + FileHandler::removedir($path); + FileHandler::makeDir($path); + } + /** * @brief byte단위의 파일크기를 적절하게 변환해서 return **/ diff --git a/modules/addon/addon.class.php b/modules/addon/addon.class.php index b43b64514..46bb3a4b6 100644 --- a/modules/addon/addon.class.php +++ b/modules/addon/addon.class.php @@ -50,5 +50,13 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + $oAddonController = &getAdminController('addon'); + $oAddonController->makeCacheFile(); + } + } ?> diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php index cb2c10493..663579937 100644 --- a/modules/admin/admin.admin.controller.php +++ b/modules/admin/admin.admin.controller.php @@ -55,5 +55,19 @@ $output = executeQuery('admin.insertShortCut', $args); return $output; } + + /** + * @brief 모든 캐시 파일 재생성 + **/ + function procAdminRecompileCacheFile() { + $oModuleModel = &getModel('module'); + $module_list = $oModuleModel->getModuleList(); + + foreach($module_list as $module) { + $oModule = null; + $oModule = &getClass($module->module); + if(method_exists($oModule, 'recompileCache')) $oModule->recompileCache(); + } + } } ?> diff --git a/modules/admin/admin.class.php b/modules/admin/admin.class.php index 8bc52267d..13dd5bbf6 100644 --- a/modules/admin/admin.class.php +++ b/modules/admin/admin.class.php @@ -42,5 +42,29 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + + // 템플릿 컴파일 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/template_compiled"); + + // optimized 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/optimized"); + + // js_filter_compiled 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/js_filter_compiled"); + + // queries 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/queries"); + + // ./files/cache/news* 파일 삭제 + $directory = dir("./files/cache/"); + while($entry = $directory->read()) { + if(substr($entry,0,11)=='newest_news') @unlink("./files/cache/".$entry); + } + $directory->close(); + } } ?> diff --git a/modules/admin/conf/module.xml b/modules/admin/conf/module.xml index b9afae3b4..8e2390264 100644 --- a/modules/admin/conf/module.xml +++ b/modules/admin/conf/module.xml @@ -6,5 +6,6 @@ + diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index 831890a4d..badda5183 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -67,12 +67,15 @@ -
+
+ +
+
-
+
diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index b72e6edee..f06bb782b 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -29,3 +29,8 @@ function fixAdminNaviHeight() { else xHeight('content',naviHeight); setTimeout(fixAdminNaviHeight, 500); } + +// 캐시파일 모두 재 생성 +function doRecompileCacheFile() { + exec_xml("admin","procAdminRecompileCacheFile"); +} diff --git a/modules/blog/blog.class.php b/modules/blog/blog.class.php index 520b1e740..c3762d821 100644 --- a/modules/blog/blog.class.php +++ b/modules/blog/blog.class.php @@ -49,5 +49,28 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // 블로그 모듈의 캐시 파일 모두 삭제 + FileHandler::removeFilesInDir("./files/cache/blog_category"); + + $oModuleModel = &getModel('module'); + $oBlogAdminController = &getAdminController('blog'); + + // 블로그 모듈 목록을 모두 구함 + $args->module = 'blog'; + $output = executeQueryArray("module.getMidList", $args); + $list = $output->data; + if(!count($list)) return; + + // 블로그 모듈에서 사용되는 모든 메뉴 목록을 재 생성 + foreach($list as $blog_item) { + $module_srl = $blog_item->module_srl; + $oBlogAdminController->makeXmlFile($module_srl); + } + + } } ?> diff --git a/modules/board/board.class.php b/modules/board/board.class.php index 06c535b71..6d2a892af 100644 --- a/modules/board/board.class.php +++ b/modules/board/board.class.php @@ -73,5 +73,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/comment/comment.class.php b/modules/comment/comment.class.php index 7662f06f9..fdff1f341 100644 --- a/modules/comment/comment.class.php +++ b/modules/comment/comment.class.php @@ -32,5 +32,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/counter/counter.class.php b/modules/counter/counter.class.php index 1785162fe..4030ba45e 100644 --- a/modules/counter/counter.class.php +++ b/modules/counter/counter.class.php @@ -40,5 +40,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/document/document.class.php b/modules/document/document.class.php index 6cf692b9c..dca58332e 100644 --- a/modules/document/document.class.php +++ b/modules/document/document.class.php @@ -105,5 +105,10 @@ return new Object(0,'success_updated'); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/editor/editor.class.php b/modules/editor/editor.class.php index 8289183f5..a3ee937ef 100644 --- a/modules/editor/editor.class.php +++ b/modules/editor/editor.class.php @@ -48,5 +48,13 @@ function moduleUpdate() { return new Object(); } + + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // 에디터 컴포넌트 캐시 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/editor"); + } } ?> diff --git a/modules/file/file.class.php b/modules/file/file.class.php index 135bb4c1a..cb104100b 100644 --- a/modules/file/file.class.php +++ b/modules/file/file.class.php @@ -45,5 +45,11 @@ function moduleUpdate() { return new Object(); } + + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/guestbook/guestbook.class.php b/modules/guestbook/guestbook.class.php index 2e0f47e7f..211eb5613 100644 --- a/modules/guestbook/guestbook.class.php +++ b/modules/guestbook/guestbook.class.php @@ -55,5 +55,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/importer/importer.class.php b/modules/importer/importer.class.php index 9f3b83dbe..b3bf5e6ec 100644 --- a/modules/importer/importer.class.php +++ b/modules/importer/importer.class.php @@ -32,5 +32,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/install/install.class.php b/modules/install/install.class.php index 8695ccd86..c9fffeb66 100644 --- a/modules/install/install.class.php +++ b/modules/install/install.class.php @@ -28,5 +28,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/integration_search/integration_search.class.php b/modules/integration_search/integration_search.class.php index 8356e4e50..c2834a9d4 100644 --- a/modules/integration_search/integration_search.class.php +++ b/modules/integration_search/integration_search.class.php @@ -43,5 +43,10 @@ return new Object(0, 'success_updated'); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/krzip/krzip.class.php b/modules/krzip/krzip.class.php index 1a2eb1a23..0fd7360dc 100644 --- a/modules/krzip/krzip.class.php +++ b/modules/krzip/krzip.class.php @@ -36,5 +36,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/layout/layout.class.php b/modules/layout/layout.class.php index 614fbead3..ea84bcf7a 100644 --- a/modules/layout/layout.class.php +++ b/modules/layout/layout.class.php @@ -39,5 +39,11 @@ function moduleUpdate() { return new Object(); } + + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/member/member.class.php b/modules/member/member.class.php index 2234d92b5..98b2b6a18 100644 --- a/modules/member/member.class.php +++ b/modules/member/member.class.php @@ -154,5 +154,11 @@ return new Object(0, 'success_updated'); } + + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/menu/menu.class.php b/modules/menu/menu.class.php index d862e8913..50e17715d 100644 --- a/modules/menu/menu.class.php +++ b/modules/menu/menu.class.php @@ -36,5 +36,26 @@ function moduleUpdate() { return new Object(); } + + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // 메뉴 모듈의 캐시 파일 모두 삭제 + FileHandler::removeFilesInDir("./files/cache/menu"); + + $oMenuAdminController = &getAdminController('menu'); + + // 블로그 모듈 목록을 모두 구함 + $output = executeQueryArray("menu.getMenus"); + $list = $output->data; + if(!count($list)) return; + + // 메뉴 모듈에서 사용되는 모든 메뉴 목록을 재 생성 + foreach($list as $menu_item) { + $menu_srl = $menu_item->menu_srl; + $oMenuAdminController->makeXmlFile($menu_srl); + } + } } ?> diff --git a/modules/message/message.class.php b/modules/message/message.class.php index 07be57488..62e8cadac 100644 --- a/modules/message/message.class.php +++ b/modules/message/message.class.php @@ -33,5 +33,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/module/module.class.php b/modules/module/module.class.php index 3db20dcf5..9132c80c2 100644 --- a/modules/module/module.class.php +++ b/modules/module/module.class.php @@ -38,5 +38,12 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // 모듈 정보 캐시 파일 모두 삭제 + FileHandler::removeFilesInDir("./files/cache/module_info"); + } } ?> diff --git a/modules/opage/opage.class.php b/modules/opage/opage.class.php index 2e21703ac..b94d54d8a 100644 --- a/modules/opage/opage.class.php +++ b/modules/opage/opage.class.php @@ -66,5 +66,12 @@ return new Object(0, 'success_updated'); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // 외부 페이지 캐시 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/opage"); + } } ?> diff --git a/modules/page/page.class.php b/modules/page/page.class.php index 9fb9eb081..54e29c90b 100644 --- a/modules/page/page.class.php +++ b/modules/page/page.class.php @@ -40,5 +40,12 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // 페이지 캐시 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/page"); + } } ?> diff --git a/modules/point/point.class.php b/modules/point/point.class.php index 2be4cf040..c0814c786 100644 --- a/modules/point/point.class.php +++ b/modules/point/point.class.php @@ -89,5 +89,14 @@ return new Object(0, 'success_updated'); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // point action 파일 재정의 + $oPointAdminController = &getAdminController('point'); + $oPointAdminController->cacheActList(); + + } } ?> diff --git a/modules/poll/poll.class.php b/modules/poll/poll.class.php index a3fa8b801..6b59e7d05 100644 --- a/modules/poll/poll.class.php +++ b/modules/poll/poll.class.php @@ -39,5 +39,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/rss/rss.class.php b/modules/rss/rss.class.php index 165bea8ef..c27491cc7 100644 --- a/modules/rss/rss.class.php +++ b/modules/rss/rss.class.php @@ -32,5 +32,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/spamfilter/spamfilter.class.php b/modules/spamfilter/spamfilter.class.php index e3d68f5d0..b1375b138 100644 --- a/modules/spamfilter/spamfilter.class.php +++ b/modules/spamfilter/spamfilter.class.php @@ -34,5 +34,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/tag/tag.class.php b/modules/tag/tag.class.php index b8076b416..9d0797071 100644 --- a/modules/tag/tag.class.php +++ b/modules/tag/tag.class.php @@ -28,5 +28,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/trackback/trackback.class.php b/modules/trackback/trackback.class.php index a7baf71aa..4b0b11469 100644 --- a/modules/trackback/trackback.class.php +++ b/modules/trackback/trackback.class.php @@ -33,5 +33,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/ttimporter/ttimporter.class.php b/modules/ttimporter/ttimporter.class.php index 1d099d7dc..237b83c9a 100644 --- a/modules/ttimporter/ttimporter.class.php +++ b/modules/ttimporter/ttimporter.class.php @@ -32,5 +32,10 @@ return new Object(); } + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + } } ?> diff --git a/modules/widget/widget.class.php b/modules/widget/widget.class.php index fcee1f982..3275a6599 100644 --- a/modules/widget/widget.class.php +++ b/modules/widget/widget.class.php @@ -37,5 +37,16 @@ function moduleUpdate() { return new Object(); } + + /** + * @brief 캐시 파일 재생성 + **/ + function recompileCache() { + // widget 정보를 담은 캐시 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/widget"); + + // widget 생성 캐시 파일 삭제 + FileHandler::removeFilesInDir("./files/cache/widget_cache"); + } } ?>
{$lang->newest_news}