@@ -37,7 +34,7 @@
diff --git a/modules/admin/tpl/shortcut_list.html b/modules/admin/tpl/shortcut_list.html
new file mode 100644
index 000000000..1d42f0ab5
--- /dev/null
+++ b/modules/admin/tpl/shortcut_list.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+ | {$lang->title} |
+ {$lang->module} |
+ {$lang->regdate} |
+ {$lang->cmd_delete} |
+
+
+
+ | {$lang->msg_shortcut_is_null} |
+
+
+
+
+ | {$shortcut_info->title} |
+ {$shortcut_info->module} |
+ {zdate($shortcut_info->last_update,"Y-m-d H:i:s")} |
+ {$lang->cmd_delete} |
+
+
+
+
+
+
diff --git a/modules/board/board.class.php b/modules/board/board.class.php
index e4c485026..f7a638dce 100644
--- a/modules/board/board.class.php
+++ b/modules/board/board.class.php
@@ -16,5 +16,26 @@
var $editor = 'default'; ///< 에디터 종류
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/comment/comment.class.php b/modules/comment/comment.class.php
index 07dd62395..32fb0a91a 100644
--- a/modules/comment/comment.class.php
+++ b/modules/comment/comment.class.php
@@ -7,5 +7,26 @@
class comment extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/document/document.class.php b/modules/document/document.class.php
index 5f69fe0d7..5c3bace58 100644
--- a/modules/document/document.class.php
+++ b/modules/document/document.class.php
@@ -13,5 +13,26 @@
// 관리자페이지에서 사용할 검색 옵션
var $search_option = array('title','content','title_content','user_name',); ///< 검색 옵션
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/document/schemas/documents.xml b/modules/document/schemas/documents.xml
index 043364074..41d1c69b6 100644
--- a/modules/document/schemas/documents.xml
+++ b/modules/document/schemas/documents.xml
@@ -18,7 +18,7 @@
-
+
diff --git a/modules/file/file.class.php b/modules/file/file.class.php
index 5edae4e5a..80a948532 100644
--- a/modules/file/file.class.php
+++ b/modules/file/file.class.php
@@ -7,5 +7,38 @@
class file extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ // file 모듈에서 사용할 디렉토리 생성
+ $directory_list = array(
+ './files',
+ './files/attach',
+ './files/attach/images',
+ './files/attach/binaries',
+ );
+
+ foreach($directory_list as $dir) {
+ if(is_dir($dir)) continue;
+ @mkdir($dir, 0707);
+ @chmod($dir, 0707);
+ }
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
}
?>
diff --git a/modules/install/install.class.php b/modules/install/install.class.php
index 1ddf567b7..68b636667 100644
--- a/modules/install/install.class.php
+++ b/modules/install/install.class.php
@@ -7,5 +7,26 @@
class install extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php
index d6910d25c..a278c62b6 100644
--- a/modules/install/install.controller.php
+++ b/modules/install/install.controller.php
@@ -77,49 +77,10 @@
// DB접속이 가능한지 체크
if(!$oDB->isConnected()) return new Object(-1, 'msg_dbconnect_failed');
- // 모든 모듈의 테이블 생성
- $output = $this->makeTable();
+ // 모든 모듈의 설치
+ $output = $this->installDownloadedModule();
if(!$output->toBool()) return $output;
- // 멤버 컨트롤러 객체 생성
- $oMemberController = &getController('member');
-
- // 그룹을 입력
- $group_args->title = Context::getLang('default_group_1');
- $group_args->is_default = 'Y';
- $output = $oMemberController->insertGroup($group_args);
-
- $group_args->title = Context::getLang('default_group_2');
- $group_args->is_default = 'N';
- $oMemberController->insertGroup($group_args);
-
- // 관리자 정보 세팅
- $admin_info = Context::gets('user_id','password','nick_name','user_name', 'email_address');
-
- // 관리자 정보 입력
- $oMemberController->insertAdmin($admin_info);
-
- // 금지 아이디 등록 (기본 + 모듈명)
- $oModuleModel = &getModel('module');
- $module_list = $oModuleModel->getModuleList();
- foreach($module_list as $key => $val) {
- $oMemberController->insertDeniedID($val->module,'');
- }
- $oMemberController->insertDeniedID('www','');
- $oMemberController->insertDeniedID('root','');
- $oMemberController->insertDeniedID('administrator','');
- $oMemberController->insertDeniedID('telnet','');
- $oMemberController->insertDeniedID('ftp','');
- $oMemberController->insertDeniedID('http','');
-
- // 로그인 처리시킴
- $output = $oMemberController->procLogin($admin_info->user_id, $admin_info->password);
- if(!$output) return $output;
-
- // 기본 모듈을 생성
- $oModule = &getController('module');
- $oModule->makeDefaultModule();
-
// config 파일 생성
if(!$this->makeConfigFile()) return new Object(-1, 'msg_install_failed');
@@ -144,11 +105,6 @@
'./files/cache/queries',
'./files/cache/js_filter_compiled',
'./files/cache/template_compiled',
- './files/cache/module_info',
- './files/cache/layout',
- './files/attach',
- './files/attach/images',
- './files/attach/binaries',
);
foreach($directory_list as $dir) {
@@ -159,34 +115,58 @@
}
/**
- * @brief DB Table 생성
+ * @brief 모든 모듈의 설치
*
* 모든 module의 schemas 디렉토리를 확인하여 schema xml을 이용, 테이블 생성
**/
- function makeTable() {
- // db instance생성
- $oDB = &DB::getInstance();
+ function installDownloadedModule() {
+
+ // install 모듈은 미리 설치
+ $this->installModule('install', './modules/install/');
// 각 모듈의 schemas/*.xml 파일을 모두 찾아서 table 생성
$module_list_1 = FileHandler::readDir('./modules/', NULL, false, true);
$module_list_2 = FileHandler::readDir('./files/modules/', NULL, false, true);
$module_list = array_merge($module_list_1, $module_list_2);
foreach($module_list as $module_path) {
- $schema_dir = sprintf('%s/schemas/', $module_path);
- $schema_files = FileHandler::readDir($schema_dir, NULL, false, true);
- $file_cnt = count($schema_files);
- if(!$file_cnt) continue;
+ // 모듈 이름을 구함
+ $tmp_arr = explode('/',$module_path);
+ $module = $tmp_arr[count($tmp_arr)-1];
- for($i=0;$i<$file_cnt;$i++) {
- $file = trim($schema_files[$i]);
- if(!$file || substr($file,-4)!='.xml') continue;
- $output = $oDB->createTableByXmlFile($file);
- if($oDB->isError()) return $oDB->getError();
- }
+ // module이 install이면 패스~
+ if($module == 'install') continue;
+
+ $this->installModule($module, $module_path);
}
return new Object();
}
+ /**
+ * @brief 개별 모듈의 설치
+ **/
+ function installModule($module, $module_path) {
+ // db instance생성
+ $oDB = &DB::getInstance();
+
+ // 해당 모듈의 schemas 디렉토리를 검사하여 schema xml파일이 있으면 생성
+ $schema_dir = sprintf('%s/schemas/', $module_path);
+ $schema_files = FileHandler::readDir($schema_dir, NULL, false, true);
+
+ $file_cnt = count($schema_files);
+ for($i=0;$i<$file_cnt;$i++) {
+ $file = trim($schema_files[$i]);
+ if(!$file || substr($file,-4)!='.xml') continue;
+ $output = $oDB->createTableByXmlFile($file);
+ }
+
+ // 테이블 설치후 module instance를 만들고 install() method를 실행
+ unset($oModule);
+ $oModule = &getClass($module);
+ if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
+
+ return new Object();
+ }
+
/**
* @brief config 파일을 생성
* 모든 설정이 이상없이 끝난 후에 config파일 생성
diff --git a/modules/krzip/krzip.class.php b/modules/krzip/krzip.class.php
index f815fc64e..df3129f87 100644
--- a/modules/krzip/krzip.class.php
+++ b/modules/krzip/krzip.class.php
@@ -11,5 +11,26 @@
var $port = 80;
var $query = '/server.php?addr3=';
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/layout/layout.class.php b/modules/layout/layout.class.php
index 06107c3ee..91a3e50eb 100644
--- a/modules/layout/layout.class.php
+++ b/modules/layout/layout.class.php
@@ -7,5 +7,37 @@
class layout extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ // layout 에서 사용할 cache디렉토리 생성
+ $directory_list = array(
+ './files',
+ './files/cache',
+ './files/cache/layout',
+ );
+
+ foreach($directory_list as $dir) {
+ if(is_dir($dir)) continue;
+ @mkdir($dir, 0707);
+ @chmod($dir, 0707);
+ }
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
}
?>
diff --git a/modules/member/member.class.php b/modules/member/member.class.php
index 5b001601e..03c682ab1 100644
--- a/modules/member/member.class.php
+++ b/modules/member/member.class.php
@@ -7,5 +7,60 @@
class member extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ // 멤버 컨트롤러 객체 생성
+ $oMemberController = &getController('member');
+
+ // 그룹을 입력
+ $group_args->title = Context::getLang('default_group_1');
+ $group_args->is_default = 'Y';
+ $output = $oMemberController->insertGroup($group_args);
+
+ $group_args->title = Context::getLang('default_group_2');
+ $group_args->is_default = 'N';
+ $oMemberController->insertGroup($group_args);
+
+ // 관리자 정보 세팅
+ $admin_info = Context::gets('user_id','password','nick_name','user_name', 'email_address');
+
+ // 관리자 정보 입력
+ $oMemberController->insertAdmin($admin_info);
+
+ // 금지 아이디 등록 (기본 + 모듈명)
+ $oModuleModel = &getModel('module');
+ $module_list = $oModuleModel->getModuleList();
+ foreach($module_list as $key => $val) {
+ $oMemberController->insertDeniedID($val->module,'');
+ }
+ $oMemberController->insertDeniedID('www','');
+ $oMemberController->insertDeniedID('root','');
+ $oMemberController->insertDeniedID('administrator','');
+ $oMemberController->insertDeniedID('telnet','');
+ $oMemberController->insertDeniedID('ftp','');
+ $oMemberController->insertDeniedID('http','');
+
+ // 로그인 처리시킴
+ $output = $oMemberController->procLogin($admin_info->user_id, $admin_info->password);
+ if(!$output) return $output;
+
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
}
?>
diff --git a/modules/message/message.class.php b/modules/message/message.class.php
index 5802c9799..5daff494c 100644
--- a/modules/message/message.class.php
+++ b/modules/message/message.class.php
@@ -7,5 +7,26 @@
class message extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/module/lang/ko.lang.php b/modules/module/lang/ko.lang.php
index 1fe5f3c77..dd98589d1 100644
--- a/modules/module/lang/ko.lang.php
+++ b/modules/module/lang/ko.lang.php
@@ -8,7 +8,9 @@
$lang->module_list = "모듈 목록";
$lang->module_index = "초기화면";
$lang->module_category = "모듈 카테고리";
+ $lang->add_shortcut = "관리자 메뉴에 추가";
$lang->category_title = "카테고리 이름";
+ $lang->cmd_add_shortcut = "바로가기 추가";
?>
diff --git a/modules/module/module.class.php b/modules/module/module.class.php
index 7dbafc147..e290b8235 100644
--- a/modules/module/module.class.php
+++ b/modules/module/module.class.php
@@ -7,5 +7,42 @@
class module extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ // module 모듈에서 사용할 디렉토리 생성
+ $directory_list = array(
+ './files',
+ './files/cache',
+ './files/cache/module_info',
+ );
+
+ foreach($directory_list as $dir) {
+ if(is_dir($dir)) continue;
+ @mkdir($dir, 0707);
+ @chmod($dir, 0707);
+ }
+
+ // 기본 모듈을 생성
+ $oModule = &getController('module');
+ $oModule->makeDefaultModule();
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/module/tpl.admin/filter/insert_shortcut.xml b/modules/module/tpl.admin/filter/insert_shortcut.xml
new file mode 100644
index 000000000..04a4c8885
--- /dev/null
+++ b/modules/module/tpl.admin/filter/insert_shortcut.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
diff --git a/modules/module/tpl.admin/js/admin.js b/modules/module/tpl.admin/js/admin.js
index 04ad74d53..585e695ce 100644
--- a/modules/module/tpl.admin/js/admin.js
+++ b/modules/module/tpl.admin/js/admin.js
@@ -24,3 +24,10 @@ function completeUpdateCategory(ret_obj) {
var url = "./?module=admin&mo=module&act=dispCategory";
location.href = url;
}
+
+/* 선택된 모듈을 관리자 메뉴의 바로가기에 등록 */
+function doAddShortCut(module) {
+ var fo_obj = xGetElementById("fo_shortcut");
+ fo_obj.selected_module.value = module;
+ procFilter(fo_obj, insert_shortcut);
+}
diff --git a/modules/module/tpl.admin/module_list.html b/modules/module/tpl.admin/module_list.html
index ede2ff9be..cb4d85943 100644
--- a/modules/module/tpl.admin/module_list.html
+++ b/modules/module/tpl.admin/module_list.html
@@ -1,4 +1,13 @@
+
+
+
+
+
+
+
| {$lang->module_name} |
@@ -7,6 +16,7 @@
{$lang->date} |
{$lang->table_count} |
{$lang->installed_path} |
+ {$lang->add_shortcut} |
@@ -31,6 +41,7 @@
| {$val->path} |
+ {$lang->cmd_add_shortcut} |
|
diff --git a/modules/rss/rss.class.php b/modules/rss/rss.class.php
index 2e46c7758..37c5371b8 100644
--- a/modules/rss/rss.class.php
+++ b/modules/rss/rss.class.php
@@ -13,5 +13,26 @@
"rss10" => "rss 1.0",
);
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/spamfilter/spamfilter.class.php b/modules/spamfilter/spamfilter.class.php
index a830998fd..a6f68172b 100644
--- a/modules/spamfilter/spamfilter.class.php
+++ b/modules/spamfilter/spamfilter.class.php
@@ -7,5 +7,26 @@
class spamfilter extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/tag/tag.class.php b/modules/tag/tag.class.php
index 96aa4772b..68461405a 100644
--- a/modules/tag/tag.class.php
+++ b/modules/tag/tag.class.php
@@ -7,5 +7,26 @@
class tag extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
diff --git a/modules/trackback/trackback.class.php b/modules/trackback/trackback.class.php
index bef3aad27..bc69dc9d1 100644
--- a/modules/trackback/trackback.class.php
+++ b/modules/trackback/trackback.class.php
@@ -7,5 +7,26 @@
class trackback extends ModuleObject {
+ /**
+ * @brief 설치시 추가 작업이 필요할시 구현
+ **/
+ function moduleInstall() {
+ return new Object();
+ }
+
+ /**
+ * @brief 설치가 이상이 없는지 체크하는 method
+ **/
+ function moduleIsInstalled() {
+ return new Object();
+ }
+
+ /**
+ * @brief 업데이트 실행
+ **/
+ function moduleUpdate() {
+ return new Object();
+ }
+
}
?>
|