mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@864 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5a2be2d812
commit
35b9bb8fd2
28 changed files with 186 additions and 485 deletions
|
|
@ -17,10 +17,8 @@
|
|||
* @brief 모듈 카테고리 추가
|
||||
**/
|
||||
function procModuleAdminInsertCategory() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->title = Context::get('title');
|
||||
$output = $oDB->executeQuery('module.insertModuleCategory', $args);
|
||||
$output = executeQuery('module.insertModuleCategory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$this->setMessage("success_registed");
|
||||
|
|
@ -51,10 +49,8 @@
|
|||
* @brief 기본 모듈 생성
|
||||
**/
|
||||
function makeDefaultModule() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 설치된 기본 모듈이 있는지 확인
|
||||
$output = $oDB->executeQuery('module.getDefaultMidInfo');
|
||||
$output = executeQuery('module.getDefaultMidInfo');
|
||||
if($output->data) return;
|
||||
|
||||
// 기본 데이터 세팅
|
||||
|
|
@ -76,17 +72,14 @@
|
|||
$args->module = $module;
|
||||
$args->config = serialize($config);
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 일단 삭제 (캐쉬 파일도 지운다)
|
||||
$output = $oDB->executeQuery('module.deleteModuleConfig', $args);
|
||||
$output = executeQuery('module.deleteModuleConfig', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
@unlink( sprintf('./files/cache/module_info/%s.config.php',$module) );
|
||||
|
||||
// 변수 정리후 query 실행
|
||||
$output = $oDB->executeQuery('module.insertModuleConfig', $args);
|
||||
$output = executeQuery('module.insertModuleConfig', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -102,13 +95,10 @@
|
|||
$skin_info = $oModuleModel->loadSkinInfo($module_path, $args->skin);
|
||||
$skin_vars->colorset = $skin_info->colorset[0]->name;
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 변수 정리후 query 실행
|
||||
$args->module_srl = $oDB->getNextSequence();
|
||||
$args->module_srl = getNextSequence();
|
||||
$args->skin_vars = serialize($skin_vars);
|
||||
$output = $oDB->executeQuery('module.insertModule', $args);
|
||||
$output = executeQuery('module.insertModule', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
|
|
@ -119,9 +109,7 @@
|
|||
* @brief 모듈의 정보를 수정
|
||||
**/
|
||||
function updateModule($args) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('module.updateModule', $args);
|
||||
$output = executeQuery('module.updateModule', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$output->add('module_srl',$args->module_srl);
|
||||
|
|
@ -138,8 +126,7 @@
|
|||
$args->type = $type;
|
||||
$args->act = $act;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('module.insertActionFoward', $args);
|
||||
$output = executeQuery('module.insertActionFoward', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -147,12 +134,10 @@
|
|||
* @brief 모듈의 기타 정보를 변경
|
||||
**/
|
||||
function updateModuleSkinVars($module_srl, $skin_vars) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// skin_vars 정보 세팅
|
||||
$args->module_srl = $module_srl;
|
||||
$args->skin_vars = $skin_vars;
|
||||
$output = $oDB->executeQuery('module.updateModuleSkinVars', $args);
|
||||
$output = executeQuery('module.updateModuleSkinVars', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
|
|
@ -162,11 +147,9 @@
|
|||
* @brief 모듈의 권한 정보 변경
|
||||
**/
|
||||
function updateModuleGrant($module_srl, $grants) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
$args->grants = $grants;
|
||||
$output = $oDB->executeQuery('module.updateModuleGrant', $args);
|
||||
$output = executeQuery('module.updateModuleGrant', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
|
|
@ -178,8 +161,6 @@
|
|||
* 모듈 삭제시는 관련 정보들을 모두 삭제 시도한다.
|
||||
**/
|
||||
function deleteModule($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_srl = $module_srl;
|
||||
|
||||
// addon 삭제
|
||||
|
|
@ -216,7 +197,7 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
// module 정보를 DB에서 삭제
|
||||
$output = $oDB->executeQuery('module.deleteModule', $args);
|
||||
$output = executeQuery('module.deleteModule', $args);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -225,9 +206,7 @@
|
|||
* @brief 모든 모듈의 is_default값을 N 으로 세팅 (기본 모듈 해제)
|
||||
**/
|
||||
function clearDefaultModule() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$output = $oDB->executeQuery('module.clearDefaultModule');
|
||||
$output = executeQuery('module.clearDefaultModule');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
|
|
@ -237,21 +216,17 @@
|
|||
* @brief 모듈 카테고리의 제목 변경
|
||||
**/
|
||||
function doUpdateModuleCategory() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->title = Context::get('title');
|
||||
$args->module_category_srl = Context::get('module_category_srl');
|
||||
return $oDB->executeQuery('module.updateModuleCategory', $args);
|
||||
return executeQuery('module.updateModuleCategory', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 카테고리 삭제
|
||||
**/
|
||||
function doDeleteModuleCategory() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->module_category_srl = Context::get('module_category_srl');
|
||||
return $oDB->executeQuery('module.deleteModuleCategory', $args);
|
||||
return executeQuery('module.deleteModuleCategory', $args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -19,12 +19,9 @@
|
|||
* 이 경우는 캐시파일을 이용할 수가 없음
|
||||
**/
|
||||
function getModuleInfoByDocumentSrl($document_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('module.getModuleInfoByDocument', $args);
|
||||
$output = executeQuery('module.getModuleInfoByDocument', $args);
|
||||
|
||||
return $this->arrangeModuleInfo($output->data);
|
||||
}
|
||||
|
|
@ -33,18 +30,15 @@
|
|||
* @brief mid로 모듈의 정보를 구함
|
||||
**/
|
||||
function getModuleInfoByMid($mid='') {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// $mid값이 인자로 주어질 경우 $mid로 모듈의 정보를 구함
|
||||
if($mid) {
|
||||
$args->mid = $mid;
|
||||
$output = $oDB->executeQuery('module.getMidInfo', $args);
|
||||
$output = executeQuery('module.getMidInfo', $args);
|
||||
}
|
||||
|
||||
// 모듈의 정보가 없다면($mid가 잘못이거나 없었을 경우) 기본 모듈을 가져옴
|
||||
if(!$output->data) {
|
||||
$output = $oDB->executeQuery('module.getDefaultMidInfo');
|
||||
$output = executeQuery('module.getDefaultMidInfo');
|
||||
}
|
||||
$module_info = $this->arrangeModuleInfo($output->data);
|
||||
|
||||
|
|
@ -55,12 +49,9 @@
|
|||
* @brief module_srl에 해당하는 모듈의 정보를 구함
|
||||
**/
|
||||
function getModuleInfoByModuleSrl($module_srl) {
|
||||
// db객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 가져옴
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('module.getMidInfo', $args);
|
||||
$output = executeQuery('module.getMidInfo', $args);
|
||||
if(!$output->data) return;
|
||||
|
||||
$module_info = $this->arrangeModuleInfo($output->data);
|
||||
|
|
@ -122,8 +113,7 @@
|
|||
* @brief DB에 생성된 mid목록을 구해옴
|
||||
**/
|
||||
function getMidList() {
|
||||
$oDB = &DB::getInstance();
|
||||
$output = $oDB->executeQuery('module.getMidList');
|
||||
$output = executeQuery('module.getMidList');
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$list = $output->data;
|
||||
|
|
@ -140,9 +130,8 @@
|
|||
**/
|
||||
function getModuleSrlByMid($mid) {
|
||||
if(is_array($mid)) $mid = "'".implode("','",$mid)."'";
|
||||
$oDB = &DB::getInstance();
|
||||
$args->mid = $mid;
|
||||
$output = $oDB->executeQuery('module.getModuleSrlByMid', $args);
|
||||
$output = executeQuery('module.getModuleSrlByMid', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$list = $output->data;
|
||||
|
|
@ -367,10 +356,8 @@
|
|||
$cache_file = sprintf('./files/cache/module_info/%s.config.php',$module);
|
||||
|
||||
if(!file_exists($cache_file)) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module = $module;
|
||||
$output = $oDB->executeQuery('module.getModuleConfig', $args);
|
||||
$output = executeQuery('module.getModuleConfig', $args);
|
||||
|
||||
$config = base64_encode($output->data->config);
|
||||
|
||||
|
|
@ -439,11 +426,8 @@
|
|||
* @brief 모듈 카테고리의 목록을 구함
|
||||
**/
|
||||
function getModuleCategories() {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$output = $oDB->executeQuery('module.getModuleCategories');
|
||||
$output = executeQuery('module.getModuleCategories');
|
||||
if(!$output->toBool()) return $output;
|
||||
$list = $output->data;
|
||||
if(!$list) return;
|
||||
|
|
@ -459,12 +443,9 @@
|
|||
* @brief 특정 모듈 카테고리의 내용을 구함
|
||||
**/
|
||||
function getModuleCategory($module_category_srl) {
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 데이터를 DB에서 가져옴
|
||||
$args->module_category_srl = $module_category_srl;
|
||||
$output = $oDB->executeQuery('module.getModuleCategory', $args);
|
||||
$output = executeQuery('module.getModuleCategory', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
return $output->data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue