git-svn-id: http://xe-core.googlecode.com/svn/trunk@153 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-02-22 03:06:50 +00:00
parent 693103aaa0
commit 17c29c6957
15 changed files with 108 additions and 107 deletions

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<module standalone="true" default_action="dispAdminIndex" management_action="">
<module default_action="dispAdminIndex">
<actions>
<action name="dispAdminIndex" type="view" grant="root" />
<action name="dispLogin" type="view" grant="guest" />
<action name="dispLogout" type="view" grant="root" />
<action name="procLogin" type="controller" grant="guest" />
<action name="procLogout" type="controller" grant="guest" />
<action name="dispAdminIndex" type="view" standalone="true" />
<action name="dispLogin" type="view" standalone="true" />
<action name="dispLogout" type="view" standalone="true" />
<action name="procLogin" type="controller" standalone="true" />
<action name="procLogout" type="controller" standalone="true" />
</actions>
</module>

View file

@ -375,9 +375,6 @@
// module_srl 값이 없다면 그냥 index 페이지를 보여줌
if(!Context::get('module_srl')) return $this->dispAdminContent();
// template 경로를 변경
$this->setTemplatePath(
// 요청받은 모듈의 정보를 구함
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<module standalone="false" default_action="dispContent" management_action="dispAdminContent">
<module default_action="dispContent">
<grants>
<grant name="list" default="guest">
<title xml:lang="ko">목록</title>
@ -35,18 +35,9 @@
<action name="dispCommentDelete" type="view" />
<action name="dispTrackbackDelete" type="view" />
<action name="dispLogin" type="view" />
<action name="dispLogout" type="view" grant="member" />
<action name="dispLogout" type="view" />
<action name="dispMessage" type="view" />
<action name="dispRss" type="view" />
<action name="dispAdminContent" type="view" grant="root" />
<action name="dispAdminBoardInfo" type="view" grant="root" />
<action name="dispAdminInsertBoard" type="view" grant="root" />
<action name="dispAdminDeleteBoard" type="view" grant="root" />
<action name="dispAdminSkinInfo" type="view" grant="root" />
<action name="dispAdminCategoryInfo" type="view" grant="root" />
<action name="dispAdminGrantInfo" type="view" grant="root" />
<action name="procLogin" type="controller" />
<action name="procLogout" type="controller" grant="member" />
<action name="procInsertDocument" type="controller" />
<action name="procDeleteDocument" type="controller" />
<action name="procVoteDocument" type="controller" />
@ -59,11 +50,20 @@
<action name="procUploadFile" type="controller" />
<action name="procDownloadFile" type="controller" />
<action name="procClearFile" type="controller" />
<action name="procInsertGrant" type="controller" grant="root"/>
<action name="procUpdateSkinInfo" type="controller" grant="root"/>
<action name="procInsertBoard" type="controller" grant="root"/>
<action name="procDeleteBoard" type="controller" grant="root"/>
<action name="procInsertCategory" type="controller" grant="root"/>
<action name="procUpdateCategory" type="controller" grant="root"/>
<action name="dispAdminContent" type="view" standalone="true" />
<action name="dispAdminBoardInfo" type="view" standalone="true" />
<action name="dispAdminInsertBoard" type="view" standalone="true" />
<action name="dispAdminDeleteBoard" type="view" standalone="true" />
<action name="dispAdminSkinInfo" type="view" standalone="true" />
<action name="dispAdminCategoryInfo" type="view" standalone="true" />
<action name="dispAdminGrantInfo" type="view" standalone="true" />
<action name="procLogin" type="controller" standalone="true" />
<action name="procLogout" type="controller" standalone="true" />
<action name="procInsertGrant" type="controller" standalone="true" />
<action name="procUpdateSkinInfo" type="controller" standalone="true" />
<action name="procInsertBoard" type="controller" standalone="true" />
<action name="procDeleteBoard" type="controller" standalone="true" />
<action name="procInsertCategory" type="controller" standalone="true" />
<action name="procUpdateCategory" type="controller" standalone="true" />
</actions>
</module>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<module standalone="true" default_action="dispIntroduce">
<module default_action="dispIntroduce">
<grants />
<actions>
<action name="dispIntroduce" type="view" grant="guest" />
<action name="dispInstallForm" type="view" grant="guest" />
<action name="procInstall" type="controller" grant="guest" />
<action name="dispIntroduce" type="view" standalone="true" />
<action name="dispInstallForm" type="view" standalone="true" />
<action name="procInstall" type="controller" standalone="true" />
</actions>
</module>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<module standalone="false" version="0.1" default_action="viewIntroduce" management_action="" >
<module default_action="viewIntroduce">
<actions>
<action name="viewIntroduce" type="view" />
<action name="viewDBInfoForm" type="view" />

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<module standalone="true" default_action="dispMessage">
<module default_action="dispMessage">
<grants />
<actions>
<action name="dispMessage" type="view" />
<action name="dispMessage" type="view" standalone="true" />
</actions>
</module>

View file

@ -11,13 +11,15 @@
* @brief 초기화
**/
function init() {
// 템플릿 경로를 지정
$this->setTemplatePath($this->module_path.'tpl');
}
/**
* @brief 메세지 출력
**/
function dispMessage() {
function dispContent() {
Context::set('system_message', $this->getMessage());
$this->setTemplateFile('system_message');
}
}

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<module standalone="false" default_action="dispContent" management_action="">
<module default_action="dispContent">
<actions>
<action name="dispContent" type="view" grant="root" />
<action name="dispContent" type="view" standalone="true" />
</actions>
</module>

View file

@ -26,9 +26,7 @@
$xml_obj = XmlParser::loadXmlFile($xml_file);
if(!count($xml_obj->module)) return;
$output->standalone = $xml_obj->module->attrs->standalone=='true'?true:false; ///< 모듈 자체적으로 실행이 가능한지에 대한 값 (기본=false)
$output->default_action = $xml_obj->module->attrs->default_action; ///< 별도의 action이 지정되지 않으면 호출될 action
$output->management_action = $xml_obj->module->attrs->management_action; ///< 관리자용으로 사용될 기본 action
$grants = $xml_obj->module->grants->grant; ///< 권한 정보 (없는 경우도 있음)
$actions = $xml_obj->module->actions->action; ///< action list (필수)
@ -40,9 +38,8 @@
foreach($grant_list as $grant) {
$name = $grant->attrs->name;
$default = $grant->attrs->default;
$default = $grant->attrs->default?$grant->attrs->default:'guest';
$title = $grant->title->body;
if(!$default) $default = 'guest';
$output->grant->{$name}->title = $title;
$output->grant->{$name}->default = $default;
@ -56,11 +53,14 @@
foreach($action_list as $action) {
$name = $action->attrs->name;
$type = $action->attrs->type;
$grant = $action->attrs->grant;
if(!$grant) $grant = 'guest';
$grant = $action->attrs->grant?$action->attrs->grant:'guest';
$standalone = $action->attrs->standalone=='true'?true:false;
$output->action->{$name}->type = $type;
$output->action->{$name}->grant = $grant;
$output->action->{$name}->standalone= $standalone;
}
}