mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Migrate board module triggers to new format using module.xml
This commit is contained in:
parent
3790169e50
commit
c8467fb588
2 changed files with 9 additions and 56 deletions
|
|
@ -33,38 +33,7 @@ class Board extends ModuleObject
|
|||
**/
|
||||
function moduleInstall()
|
||||
{
|
||||
// use action forward(enabled in the admin model)
|
||||
$oModuleController = getController('module');
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
// 2007. 10. 17 insert member menu trigger
|
||||
$oModuleController->insertTrigger('member.getMemberMenu', 'board', 'controller', 'triggerMemberMenu', 'after');
|
||||
|
||||
// install board module
|
||||
$args = new stdClass;
|
||||
$args->site_srl = 0;
|
||||
$output = executeQuery('module.getSite', $args);
|
||||
if(!$output->data->index_module_srl)
|
||||
{
|
||||
$args->mid = 'board';
|
||||
$args->module = 'board';
|
||||
$args->browser_title = 'Rhymix';
|
||||
$args->skin = 'default';
|
||||
$args->site_srl = 0;
|
||||
$output = $oModuleController->insertModule($args);
|
||||
|
||||
if($output->toBool())
|
||||
{
|
||||
$module_srl = $output->get('module_srl');
|
||||
|
||||
$site_args = new stdClass;
|
||||
$site_args->site_srl = 0;
|
||||
$site_args->index_module_srl = $module_srl;
|
||||
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->updateSite($site_args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -72,14 +41,7 @@ class Board extends ModuleObject
|
|||
**/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
// 2007. 10. 17 get the member menu trigger
|
||||
if(!$oModuleModel->getTrigger('member.getMemberMenu', 'board', 'controller', 'triggerMemberMenu', 'after')) return true;
|
||||
|
||||
// 2011. 09. 20 when add new menu in sitemap, custom menu add
|
||||
if(!$oModuleModel->getTrigger('menu.getModuleListInSitemap', 'board', 'model', 'triggerModuleListInSitemap', 'after')) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -87,20 +49,7 @@ class Board extends ModuleObject
|
|||
**/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
|
||||
// 2007. 10. 17 check the member menu trigger, if it is not existed then insert
|
||||
if(!$oModuleModel->getTrigger('member.getMemberMenu', 'board', 'controller', 'triggerMemberMenu', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('member.getMemberMenu', 'board', 'controller', 'triggerMemberMenu', 'after');
|
||||
}
|
||||
|
||||
// 2011. 09. 20 when add new menu in sitemap, custom menu add
|
||||
if(!$oModuleModel->getTrigger('menu.getModuleListInSitemap', 'board', 'model', 'triggerModuleListInSitemap', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('menu.getModuleListInSitemap', 'board', 'model', 'triggerModuleListInSitemap', 'after');
|
||||
}
|
||||
}
|
||||
|
||||
function moduleUninstall()
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<action name="dispBoardUpdateLogView" type="view" permission="update_view" standalone="false" />
|
||||
<action name="dispBoardVoteLog" type="view" permission="vote_log_view" standalone="false" />
|
||||
<action name="dispBoardNotFound" type="view" standalone="false" error-handlers="404" />
|
||||
|
||||
|
||||
<action name="dispBoardNoticeList" type="view" permission="list" standalone="false" />
|
||||
<action name="dispBoardCategoryList" type="view" permission="list" standalone="false" />
|
||||
<action name="dispBoardContentCommentList" type="view" permission="view" standalone="false" />
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
<action name="dispBoardCategory" type="view" permission="list" standalone="false" />
|
||||
<action name="dispBoardCommentPage" type="view" permission="view" standalone="false" />
|
||||
<action name="getBoardCommentPage" type="mobile" permission="view" standalone="false" />
|
||||
|
||||
|
||||
<action name="procBoardInsertDocument" type="controller" permission="write_document" standalone="false" ruleset="insertDocument" />
|
||||
<action name="procBoardDeleteDocument" type="controller" permission="write_document" standalone="false" />
|
||||
<action name="procBoardRevertDocument" type="controller" permission="update_view" standalone="false" />
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
<action name="procBoardDeleteTrackback" type="controller" permission="list,view" standalone="false" />
|
||||
<action name="procBoardVerificationPassword" type="controller" permission="view" standalone="false" />
|
||||
<action name="procBoardVoteDocument" type="controller" permission="view" standalone="false" />
|
||||
|
||||
|
||||
<action name="dispBoardAdminContent" type="view" admin_index="true" menu_name="board" menu_index="true" />
|
||||
<action name="dispBoardAdminInsertBoard" type="view" setup_index="true" menu_name="board" />
|
||||
<action name="dispBoardAdminDeleteBoard" type="view" menu_name="board" />
|
||||
|
|
@ -122,15 +122,19 @@
|
|||
<action name="dispBoardAdminBoardAdditionSetup" type="view" permission="manager" menu_name="board" />
|
||||
<action name="dispBoardAdminSkinInfo" type="view" permission="manager" menu_name="board" />
|
||||
<action name="dispBoardAdminMobileSkinInfo" type="view" permission="manager" menu_name="board" />
|
||||
|
||||
|
||||
<action name="getBoardAdminSimpleSetup" type="model" simple_setup_index="true" />
|
||||
|
||||
|
||||
<action name="procBoardAdminInsertBoard" type="controller" permission="manager" check_var="module_srl" ruleset="insertBoard" />
|
||||
<action name="procBoardAdminDeleteBoard" type="controller" permission="manager" check_var="module_srl" />
|
||||
<action name="procBoardAdminUpdateBoard" type="controller" ruleset="insertBoardForBasic" />
|
||||
<action name="procBoardAdminInsertCombinedConfig" type="controller" />
|
||||
<action name="procBoardAdminSaveCategorySettings" type="controller" permission="manager" check_var="module_srl" ruleset="saveCategorySettings" />
|
||||
</actions>
|
||||
<eventHandlers>
|
||||
<eventHandler after="member.getMemberMenu" class="controller" method="triggerMemberMenu" />
|
||||
<eventHandler after="menu.getModuleListInSitemap" class="model" method="triggerModuleListInSitemap" />
|
||||
</eventHandlers>
|
||||
<menus>
|
||||
<menu name="board" type="all">
|
||||
<title xml:lang="en">Board</title>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue