mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
english comments added
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
693e215bc1
commit
4d272994dd
219 changed files with 6407 additions and 8705 deletions
|
|
@ -55,7 +55,7 @@
|
|||
/**
|
||||
* @brief sett to set the template path for refresh.html
|
||||
* @remark refresh.html is executed as a result of method execution
|
||||
* 공통 tpl중 refresh.html을 실행할 뿐..
|
||||
* Tpl as the common run of the refresh.html ..
|
||||
**/
|
||||
function setRefreshPage() {
|
||||
$this->setTemplatePath('./common/tpl');
|
||||
|
|
@ -76,21 +76,18 @@
|
|||
* @param[in] $xml_info object containing module description
|
||||
**/
|
||||
function setModuleInfo($module_info, $xml_info) {
|
||||
// 기본 변수 설정
|
||||
// The default variable settings
|
||||
$this->mid = $module_info->mid;
|
||||
$this->module_srl = $module_info->module_srl;
|
||||
$this->module_info = $module_info;
|
||||
$this->xml_info = $xml_info;
|
||||
$this->skin_vars = $module_info->skin_vars;
|
||||
|
||||
// 웹서비스에서 꼭 필요한 인증 정보와 권한 설정 체크
|
||||
// validate certificate info and permission settings necessary in Web-services
|
||||
$is_logged = Context::get('is_logged');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// module model 객체 생성
|
||||
// module model create an object
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// XE에서 access, manager (== is_admin) 는 고정된 권한명이며 이와 관련된 권한 설정
|
||||
// permission settings. access, manager(== is_admin) are fixed and privilege name in XE
|
||||
$module_srl = Context::get('module_srl');
|
||||
if(!$module_info->mid && preg_match('/^([0-9]+)$/',$module_srl)) {
|
||||
$request_module = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
|
|
@ -100,19 +97,15 @@
|
|||
} else {
|
||||
$grant = $oModuleModel->getGrant($module_info, $logged_info, $xml_info);
|
||||
}
|
||||
|
||||
// 현재 모듈의 access 권한이 없으면 권한 없음 표시
|
||||
// display no permission if the current module doesn't have an access privilege
|
||||
//if(!$grant->access) return $this->stop("msg_not_permitted");
|
||||
|
||||
// 관리 권한이 없으면 permision, action 확인
|
||||
// checks permission and action if you don't have an admin privilege
|
||||
if(!$grant->manager) {
|
||||
// 현재 요청된 action의 퍼미션 type(guest, member, manager, root)를 구함
|
||||
// get permission types(guest, member, manager, root) of the currently requested action
|
||||
$permission_target = $xml_info->permission->{$this->act};
|
||||
|
||||
// module.xml에 명시된 퍼미션이 없을때 action명에 Admin이 있으면 manager로 체크
|
||||
// check manager if a permission in module.xml otherwise action if no permission
|
||||
if(!$permission_target && substr_count($this->act, 'Admin')) $permission_target = 'manager';
|
||||
|
||||
// 권한 체크
|
||||
// Check permissions
|
||||
switch($permission_target) {
|
||||
case 'root' :
|
||||
$this->stop('msg_not_permitted_act');
|
||||
|
|
@ -125,8 +118,7 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 권한변수 설정
|
||||
// permission variable settings
|
||||
$this->grant = $grant;
|
||||
Context::set('grant', $grant);
|
||||
|
||||
|
|
@ -138,14 +130,12 @@
|
|||
* @param $msg_code an error code
|
||||
**/
|
||||
function stop($msg_code) {
|
||||
// proc 수행을 중지 시키기 위한 플래그 세팅
|
||||
// flag setting to stop the proc processing
|
||||
$this->stop_proc = true;
|
||||
|
||||
// 에러 처리
|
||||
// Error handling
|
||||
$this->setError(-1);
|
||||
$this->setMessage($msg_code);
|
||||
|
||||
// message 모듈의 에러 표시
|
||||
// Error message display by message module
|
||||
$type = Mobile::isFromMobilePhone() ? 'mobile' : 'view';
|
||||
$oMessageObject = &ModuleHandler::getModuleInstance('message',$type);
|
||||
$oMessageObject->setError(-1);
|
||||
|
|
@ -241,7 +231,7 @@
|
|||
*
|
||||
**/
|
||||
function proc() {
|
||||
// stop_proc==true이면 그냥 패스
|
||||
// pass if stop_proc is true
|
||||
if($this->stop_proc) return false;
|
||||
|
||||
// trigger call
|
||||
|
|
@ -252,23 +242,20 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
// addon 실행(called_position 를 before_module_proc로 하여 호출)
|
||||
// execute an addon(call called_position as before_module_proc)
|
||||
$called_position = 'before_module_proc';
|
||||
$oAddonController = &getController('addon');
|
||||
$addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone()?"mobile":"pc");
|
||||
@include($addon_file);
|
||||
|
||||
if(isset($this->xml_info->action->{$this->act}) && method_exists($this, $this->act)) {
|
||||
|
||||
// 권한 체크
|
||||
// Check permissions
|
||||
if(!$this->grant->access) return $this->stop("msg_not_permitted_act");
|
||||
|
||||
// 모듈의 스킨 정보를 연동 (스킨 정보의 테이블 분리로 동작대상 모듈에만 스킨 정보를 싱크시키도록 변경)
|
||||
// integrate skin information of the module(change to sync skin info with the target module only by seperating its table)
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleModel->syncSkinInfoToModuleInfo($this->module_info);
|
||||
Context::set('module_info', $this->module_info);
|
||||
|
||||
// 실행
|
||||
// Run
|
||||
$output = $this->{$this->act}();
|
||||
}
|
||||
else {
|
||||
|
|
@ -283,7 +270,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
// addon 실행(called_position 를 after_module_proc로 하여 호출)
|
||||
// execute an addon(call called_position as after_module_proc)
|
||||
$called_position = 'after_module_proc';
|
||||
$oAddonController = &getController('addon');
|
||||
$addon_file = $oAddonController->getCacheFilePath(Mobile::isFromMobilePhone()?"mobile":"pc");
|
||||
|
|
@ -294,8 +281,7 @@
|
|||
$this->setMessage($output->getMessage());
|
||||
return false;
|
||||
}
|
||||
|
||||
// view action이고 결과 출력이 XMLRPC 또는 JSON일 경우 해당 모듈의 api method를 실행
|
||||
// execute api methos of the module if view action is and result is XMLRPC or JSON
|
||||
if($this->module_info->module_type == 'view'){
|
||||
if(Context::getResponseMethod() == 'XMLRPC' || Context::getResponseMethod() == 'JSON') {
|
||||
$oAPI = getAPI($this->module_info->module, 'api');
|
||||
|
|
@ -304,7 +290,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue