mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 03:52:15 +09:00
ModuleHandler 부분의 주석 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3524 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e563569d72
commit
855f243fab
2 changed files with 47 additions and 56 deletions
|
|
@ -73,7 +73,7 @@
|
||||||
// ModuleModel 객체 생성
|
// ModuleModel 객체 생성
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
||||||
// document_srl이 있으면 document_srl로 모듈과 모듈 정보를 구함
|
// document_srl만 있을 경우 document_srl로 모듈과 모듈 정보를 구함
|
||||||
if($this->document_srl && !$this->mid && !$this->module_srl) {
|
if($this->document_srl && !$this->mid && !$this->module_srl) {
|
||||||
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($this->document_srl);
|
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($this->document_srl);
|
||||||
if($this->module && $module_info->module != $this->module) unset($module_info);
|
if($this->module && $module_info->module != $this->module) unset($module_info);
|
||||||
|
|
@ -147,14 +147,6 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 설정된 mid가 없을 경우 요청된 act의 standalone 여부 체크
|
|
||||||
/*
|
|
||||||
if(!$this->mid && !$xml_info->action->{$this->act}->standalone) {
|
|
||||||
$this->error = 'msg_module_is_not_standalone';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// type, grant 값 구함
|
// type, grant 값 구함
|
||||||
$type = $xml_info->action->{$this->act}->type;
|
$type = $xml_info->action->{$this->act}->type;
|
||||||
$grant = $xml_info->action->{$this->act}->grant;
|
$grant = $xml_info->action->{$this->act}->grant;
|
||||||
|
|
@ -210,6 +202,7 @@
|
||||||
|
|
||||||
// 해당 모듈에 layout_srl이 있는지 확인
|
// 해당 모듈에 layout_srl이 있는지 확인
|
||||||
if($oModule->module_info->layout_srl && !$oModule->getLayoutFile()) {
|
if($oModule->module_info->layout_srl && !$oModule->getLayoutFile()) {
|
||||||
|
|
||||||
// layout_srl이 있으면 해당 레이아웃 정보를 가져와 layout_path/ layout_file 위치 변경
|
// layout_srl이 있으면 해당 레이아웃 정보를 가져와 layout_path/ layout_file 위치 변경
|
||||||
$oLayoutModel = &getModel('layout');
|
$oLayoutModel = &getModel('layout');
|
||||||
$layout_info = $oLayoutModel->getLayout($oModule->module_info->layout_srl);
|
$layout_info = $oLayoutModel->getLayout($oModule->module_info->layout_srl);
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,9 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief document_srl로 모듈의 정보르 구함
|
* @brief document_srl로 모듈의 정보르 구함
|
||||||
*
|
|
||||||
* 이 경우는 캐시파일을 이용할 수가 없음
|
* 이 경우는 캐시파일을 이용할 수가 없음
|
||||||
**/
|
**/
|
||||||
function getModuleInfoByDocumentSrl($document_srl) {
|
function getModuleInfoByDocumentSrl($document_srl) {
|
||||||
// 데이터를 DB에서 가져옴
|
|
||||||
$args->document_srl = $document_srl;
|
$args->document_srl = $document_srl;
|
||||||
$output = executeQuery('module.getModuleInfoByDocument', $args);
|
$output = executeQuery('module.getModuleInfoByDocument', $args);
|
||||||
|
|
||||||
|
|
@ -37,13 +35,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// 모듈의 정보가 없다면($mid가 잘못이거나 없었을 경우) 기본 모듈을 가져옴
|
// 모듈의 정보가 없다면($mid가 잘못이거나 없었을 경우) 기본 모듈을 가져옴
|
||||||
if(!$output->data) {
|
if(!$output->data) $output = executeQuery('module.getDefaultMidInfo');
|
||||||
$output = executeQuery('module.getDefaultMidInfo');
|
|
||||||
}
|
|
||||||
|
|
||||||
$module_info = $this->arrangeModuleInfo($output->data);
|
return $this->arrangeModuleInfo($output->data);
|
||||||
|
|
||||||
return $module_info;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -55,22 +49,58 @@
|
||||||
$output = executeQuery('module.getMidInfo', $args);
|
$output = executeQuery('module.getMidInfo', $args);
|
||||||
if(!$output->data) return;
|
if(!$output->data) return;
|
||||||
|
|
||||||
$module_info = $this->arrangeModuleInfo($output->data);
|
return $this->arrangeModuleInfo($output->data);
|
||||||
|
|
||||||
return $module_info;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 여러개의 module_srl에 해당하는 모듈의 정보를 구함
|
* @brief 여러개의 module_srl에 해당하는 모듈의 정보를 구함
|
||||||
**/
|
**/
|
||||||
function getModulesInfo($module_srls) {
|
function getModulesInfo($module_srls) {
|
||||||
// 데이터를 가져옴
|
|
||||||
$args->module_srls = $module_srls;
|
$args->module_srls = $module_srls;
|
||||||
$output = executeQueryArray('module.getModulesInfo', $args);
|
$output = executeQueryArray('module.getModulesInfo', $args);
|
||||||
if(!$output->toBool()) return;
|
if(!$output->toBool()) return;
|
||||||
return $output->data;
|
return $output->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief DB에 생성된 mid 전체 목록을 구해옴
|
||||||
|
**/
|
||||||
|
function getMidList($args = null) {
|
||||||
|
$output = executeQuery('module.getMidList', $args);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
$list = $output->data;
|
||||||
|
if(!$list) return;
|
||||||
|
|
||||||
|
if(!is_array($list)) $list = array($list);
|
||||||
|
|
||||||
|
foreach($list as $val) {
|
||||||
|
$mid_list[$val->mid] = $val;
|
||||||
|
}
|
||||||
|
return $mid_list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief mid 목록에 대응하는 module_srl을 배열로 return
|
||||||
|
**/
|
||||||
|
function getModuleSrlByMid($mid) {
|
||||||
|
if(is_array($mid)) $mid = "'".implode("','",$mid)."'";
|
||||||
|
|
||||||
|
$args->mid = $mid;
|
||||||
|
$output = executeQuery('module.getModuleSrlByMid', $args);
|
||||||
|
if(!$output->toBool()) return $output;
|
||||||
|
|
||||||
|
$list = $output->data;
|
||||||
|
if(!$list) return;
|
||||||
|
if(!is_array($list)) $list = array($list);
|
||||||
|
|
||||||
|
foreach($list as $key => $val) {
|
||||||
|
$module_srl_list[] = $val->module_srl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $module_srl_list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief DB에서 가져온 원 모듈 정보에서 grant, extraVar등의 정리
|
* @brief DB에서 가져온 원 모듈 정보에서 grant, extraVar등의 정리
|
||||||
**/
|
**/
|
||||||
|
|
@ -144,40 +174,6 @@
|
||||||
return $output->data;
|
return $output->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief DB에 생성된 mid목록을 구해옴
|
|
||||||
**/
|
|
||||||
function getMidList($args = null) {
|
|
||||||
$output = executeQuery('module.getMidList', $args);
|
|
||||||
if(!$output->toBool()) return $output;
|
|
||||||
|
|
||||||
$list = $output->data;
|
|
||||||
if(!$list) return;
|
|
||||||
|
|
||||||
if(!is_array($list)) $list = array($list);
|
|
||||||
|
|
||||||
foreach($list as $val) {
|
|
||||||
$mid_list[$val->mid] = $val;
|
|
||||||
}
|
|
||||||
return $mid_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief mid 목록에 대응하는 module_srl을 배열로 return
|
|
||||||
**/
|
|
||||||
function getModuleSrlByMid($mid) {
|
|
||||||
if(is_array($mid)) $mid = "'".implode("','",$mid)."'";
|
|
||||||
$args->mid = $mid;
|
|
||||||
$output = executeQuery('module.getModuleSrlByMid', $args);
|
|
||||||
if(!$output->toBool()) return $output;
|
|
||||||
|
|
||||||
$list = $output->data;
|
|
||||||
if(!$list) return;
|
|
||||||
if(!is_array($list)) $list = array($list);
|
|
||||||
foreach($list as $key => $val) $module_srl_list[] = $val->module_srl;
|
|
||||||
return $module_srl_list;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 주어진 곳의 스킨 목록을 구함
|
* @brief 주어진 곳의 스킨 목록을 구함
|
||||||
* 스킨과 skin.xml 파일을 분석 정리한 결과를 return
|
* 스킨과 skin.xml 파일을 분석 정리한 결과를 return
|
||||||
|
|
@ -311,7 +307,6 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief module의 conf/module.xml 을 통해 grant(권한) 및 action 데이터를 return
|
* @brief module의 conf/module.xml 을 통해 grant(권한) 및 action 데이터를 return
|
||||||
*
|
|
||||||
* module.xml 파일의 경우 파싱하는데 시간이 걸리기에 캐싱을 한다...
|
* module.xml 파일의 경우 파싱하는데 시간이 걸리기에 캐싱을 한다...
|
||||||
* 캐싱을 할때 바로 include 할 수 있도록 역시 코드까지 추가하여 캐싱을 한다.
|
* 캐싱을 할때 바로 include 할 수 있도록 역시 코드까지 추가하여 캐싱을 한다.
|
||||||
* 이게 퍼포먼스 상으로는 좋은데 어떤 부정적인 결과를 유도할지는 잘 모르겠...
|
* 이게 퍼포먼스 상으로는 좋은데 어떤 부정적인 결과를 유도할지는 잘 모르겠...
|
||||||
|
|
@ -617,6 +612,9 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 특정 모듈의 정보와 회원의 정보를 받아서 관리 권한 유무를 판단
|
* @brief 특정 모듈의 정보와 회원의 정보를 받아서 관리 권한 유무를 판단
|
||||||
|
* 회원의 아이디가 해당 모듈의 admin_id에 있으면 true
|
||||||
|
* 회원이 속한 그룹이 해당 모듈의 manager 그룹에 있으면 true
|
||||||
|
* 이 method는 각 모듈.class.php 에서 isAdmin method에서 사용됨
|
||||||
**/
|
**/
|
||||||
function isModuleAdmin($module_info, $member_info) {
|
function isModuleAdmin($module_info, $member_info) {
|
||||||
$user_id = $member_info->user_id;
|
$user_id = $member_info->user_id;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue