mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@123 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
242b24d369
commit
756ecc1423
28 changed files with 197 additions and 153 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module default_action="dispContent" management_action="">
|
||||
<actions>
|
||||
<action name="dispContent" type="view" grant="guest" />
|
||||
<action name="dispContent" type="view" grant="root" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -23,14 +23,15 @@
|
|||
$output = $oDB->executeQuery('module.getDefaultMidInfo');
|
||||
if($output->data) return;
|
||||
|
||||
// 기본 모듈 입력
|
||||
// extra_vars 데이터 세팅
|
||||
$extra_vars->colorset = 'normal';
|
||||
|
||||
// 기본 데이터 세팅
|
||||
$args->mid = 'board';
|
||||
$args->browser_title = '테스트 모듈';
|
||||
$args->is_default = 'Y';
|
||||
$args->module = 'board';
|
||||
$args->skin = 'default';
|
||||
|
||||
$extra_vars->colorset = 'normal';
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
|
||||
return $this->insertModule($args);
|
||||
|
|
@ -41,17 +42,20 @@
|
|||
**/
|
||||
function insertModule($args) {
|
||||
// module model 객체 생성
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 선택된 스킨정보에서 colorset을 구함
|
||||
$skin_info = $oModuleModel->loadSkinInfo($args->module, $args->skin);
|
||||
$extra_vars->colorset = $skin_info->colorset[0]->name;
|
||||
|
||||
// db에 입력
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 변수 정리후 query 실행
|
||||
$args->module_srl = $oDB->getNextSequence();
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
$output = $oDB->executeQuery('module.insertModule', $args);
|
||||
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -61,6 +65,7 @@
|
|||
**/
|
||||
function updateModule($args) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('module.updateModule', $args);
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
return $output;
|
||||
|
|
@ -71,6 +76,7 @@
|
|||
**/
|
||||
function updateModuleExtraVars($module_srl, $extra_vars) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$args->extra_vars = $extra_vars;
|
||||
$output = $oDB->executeQuery('module.updateModuleExtraVars', $args);
|
||||
|
|
@ -82,6 +88,7 @@
|
|||
**/
|
||||
function updateModuleGrant($module_srl, $grant) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$args->grant = $grant;
|
||||
$output = $oDB->executeQuery('module.updateModuleGrant', $args);
|
||||
|
|
@ -97,10 +104,11 @@
|
|||
$oDB = &DB::getInstance();
|
||||
|
||||
// addon 삭제
|
||||
|
||||
// plugin 삭제
|
||||
|
||||
// document 삭제
|
||||
$oDocumentController = getController('document');
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->deleteModuleDocument($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
|
@ -109,25 +117,26 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
// trackbacks 삭제
|
||||
$oTrackbackController = getController('trackback');
|
||||
$oTrackbackController = &getController('trackback');
|
||||
$output = $oTrackbackController->deleteModuleTrackbacks($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// comments 삭제
|
||||
$oCommentController = getController('comment');
|
||||
$oCommentController = &getController('comment');
|
||||
$output = $oCommentController->deleteModuleComments($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// tags 삭제
|
||||
$oTagController = getController('tag');
|
||||
$oTagController = &getController('tag');
|
||||
$output = $oTagController->deleteModuleTags($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// files 삭제
|
||||
$output = $oDocumentController->deleteModuleFiles($module_srl);
|
||||
// 첨부 파일 삭제
|
||||
$oFileController = &getController('file');
|
||||
$output = $oFileController->deleteModuleFiles($module_srl);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// module 정보 삭제
|
||||
// module 정보를 DB에서 삭제
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('module.deleteModule', $args);
|
||||
|
||||
|
|
@ -139,6 +148,7 @@
|
|||
**/
|
||||
function clearDefaultModule() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
return $oDB->executeQuery('module.clearDefaultModule');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@
|
|||
$class_path = ModuleHandler::getModulePath($module);
|
||||
if(!$class_path) return;
|
||||
|
||||
$action_xml_file = sprintf("%sconf/module.xml", $class_path);
|
||||
if(!file_exists($action_xml_file)) return;
|
||||
$xml_file = sprintf("%sconf/module.xml", $class_path);
|
||||
if(!file_exists($xml_file)) return;
|
||||
|
||||
$xml_obj = XmlParser::loadXmlFile($action_xml_file);
|
||||
$xml_obj = XmlParser::loadXmlFile($xml_file);
|
||||
if(!count($xml_obj->module)) return;
|
||||
|
||||
$output->default_action = $xml_obj->module->attrs->default_action; ///< 별도의 action이 지정되지 않으면 호출될 action
|
||||
|
|
@ -112,8 +112,10 @@
|
|||
* @brief document_srl로 모듈의 정보르 구함
|
||||
**/
|
||||
function getModuleInfoByDocumentSrl($document_srl) {
|
||||
// DB 객체 생성후 데이터를 DB에서 가져옴
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('module.getModuleInfoByDocument', $args);
|
||||
|
||||
|
|
@ -124,7 +126,7 @@
|
|||
* @brief mid로 모듈의 정보를 구함
|
||||
**/
|
||||
function getModuleInfoByMid($mid='') {
|
||||
// DB 객체 생성후 데이터를 DB에서 가져옴
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// $mid값이 인자로 주어질 경우 $mid로 모듈의 정보를 구함
|
||||
|
|
@ -145,8 +147,10 @@
|
|||
* @brief module_srl에 해당하는 모듈의 정보를 구함
|
||||
**/
|
||||
function getModuleInfoByModuleSrl($module_srl='') {
|
||||
// db에서 데이터를 가져옴
|
||||
// db객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 가져옴
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('module.getMidInfo', $args);
|
||||
if(!$output->data) return;
|
||||
|
|
@ -162,11 +166,11 @@
|
|||
|
||||
// serialize되어 있는 변수들 추출
|
||||
$extra_vars = $source_module_info->extra_vars;
|
||||
$grant = $source_module_info->grant;
|
||||
$grants = $source_module_info->grants;
|
||||
$admin_id = $source_module_info->admin_id;
|
||||
|
||||
unset($source_module_info->extra_vars);
|
||||
unset($source_module_info->grant);
|
||||
unset($source_module_info->grants);
|
||||
unset($source_module_info->admin_id);
|
||||
|
||||
$module_info = clone($source_module_info);
|
||||
|
|
@ -178,7 +182,7 @@
|
|||
}
|
||||
|
||||
// 권한의 정리
|
||||
if($grant) $module_info->grant = unserialize($grant);
|
||||
if($grants) $module_info->grants = unserialize($grants);
|
||||
|
||||
// 관리자 아이디의 정리
|
||||
if($module_info->admin_id) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
**/
|
||||
function dispContent() {
|
||||
// 모듈모델 객체를 구함
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 등록된 모듈의 목록을 구해옴
|
||||
$installed_module_list = $oModuleModel->getModulesInfo();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<column name="modules.use_category" alias="use_category" />
|
||||
<column name="modules.extra_vars" alias="extra_vars" />
|
||||
<column name="modules.layout_file" alias="layout_file" />
|
||||
<column name="modules.grant" alias="grant" />
|
||||
<column name="modules.grants" alias="grants" />
|
||||
<column name="modules.admin_id" alias="admin_id" />
|
||||
<column name="modules.header_text" alias="header_text" />
|
||||
<column name="modules.footer_text" alias="footer_text" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="grant" var="grant" />
|
||||
<column name="grants" var="grants" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" notnull="notnull"/>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<column name="use_category" type="char" size="1" default="N"/>
|
||||
<column name="extra_vars" type="text" />
|
||||
<column name="layout_file" type="varchar" size="250" />
|
||||
<column name="grant_list" type="text" />
|
||||
<column name="grants" type="text" />
|
||||
<column name="admin_id" type="text" />
|
||||
<column name="header_text" type="text" />
|
||||
<column name="footer_text" type="text" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue