mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@831 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7df7339504
commit
fe7d8dffa6
7 changed files with 49 additions and 7 deletions
|
|
@ -104,7 +104,7 @@
|
|||
$xml_info = $oModuleModel->getModuleActionXml($this->module);
|
||||
|
||||
// 현재 요청된 act가 있으면 $xml_info에서 type을 찾음, 없다면 기본 action을 이용
|
||||
if(!$this->act || !$xml_info->action->{$this->act}) $this->act = $xml_info->default_index_act;
|
||||
if(!$this->act) $this->act = $xml_info->default_index_act;
|
||||
|
||||
// act값이 지정이 안되어 있으면 오류 표시
|
||||
if(!$this->act) {
|
||||
|
|
|
|||
|
|
@ -253,6 +253,28 @@
|
|||
// act가 없으면 action_forward에서 해당하는 act가 있는지 찾아서 대신 실행
|
||||
} else if(Context::isInstalled()) {
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$forward = $oModuleModel->getActionForward($this->act);
|
||||
if($forward->module && $forward->type && $forward->act) {
|
||||
|
||||
$oModule = &getModule($forward->module, $forward->type);
|
||||
$xml_info = $oModuleModel->getModuleActionXml($forward->module);
|
||||
$oModule->setAct($forward->act);
|
||||
$oModule->init();
|
||||
$oModule->setModuleInfo(null, $xml_info);
|
||||
$output = call_user_method($forward->act, $oModule);
|
||||
|
||||
$this->setTemplatePath($oModule->getTemplatePath());
|
||||
$this->setTemplateFile($oModule->getTemplateFile());
|
||||
|
||||
} else {
|
||||
if($this->xml_info->default_index_act) {
|
||||
$output = call_user_method($this->xml_info->default_index_act, $this);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
Context::set('module_list', $module_list);
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl.admin');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('file_list');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,15 @@
|
|||
return $module_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief act 값에 의한 forward 값을 구함
|
||||
**/
|
||||
function getActionForward($act) {
|
||||
$args->act = $act;
|
||||
$output = executeQuery('module.getActionForward',$args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief DB에 생성된 mid목록을 구해옴
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@
|
|||
**/
|
||||
function init() {
|
||||
// template path 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl.admin');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 관리자 페이지
|
||||
**/
|
||||
function dispModuleAdminContent() {
|
||||
$this->dispModuleList();
|
||||
$this->dispModuleAdminList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
11
modules/module/queries/getActionForward.xml
Normal file
11
modules/module/queries/getActionForward.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="getActionForward" action="select">
|
||||
<tables>
|
||||
<table name="action_foward" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="act" default="act" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<table name="action_foward">
|
||||
<column name="act" type="varchar" size="60" notnull="notnull" unique="idx_foward"/>
|
||||
<column name="module" type="varchar" size="40" notnull="notnull" unique="idx_foward" />
|
||||
<column name="type" type="varchar" size="15" notnull="notnull" unique="idx_foward"/>
|
||||
<column name="act" type="varchar" size="80" notnull="notnull" unique="idx_foward"/>
|
||||
<column name="module" type="varchar" size="60" notnull="notnull" />
|
||||
<column name="type" type="varchar" size="15" notnull="notnull" />
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue