mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 17:59:55 +09:00
issue 2364 when menu info update, menu_srl update in module also
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12021 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
52e3a1c4a9
commit
ba41d04f2c
1 changed files with 29 additions and 2 deletions
|
|
@ -690,7 +690,7 @@
|
|||
$parent_srl = 0;
|
||||
}
|
||||
|
||||
$this->moveMenuItem($menu_srl, $parent_srl, $source_srl, $target_srl, $mode);
|
||||
$this->moveMenuItem($menu_srl, $parent_srl, $source_srl, $target_srl, $mode, $originMenu['is_shortcut'], $originMenu['url']);
|
||||
if(count($originMenu['list']) > 0)
|
||||
{
|
||||
$this->_recursiveUpdateMenuItem($originMenu['list'], $menu_srl);
|
||||
|
|
@ -714,6 +714,19 @@
|
|||
$args->menu_item_srl = $node['node_srl'];
|
||||
$output = executeQuery('menu.updateMenuItemNode', $args);
|
||||
|
||||
//module's menu_srl move also
|
||||
if($node['is_shortcut'] == 'N' && !empty($node['url']))
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($node['url']);
|
||||
if($menu_srl != $moduleInfo->menu_srl)
|
||||
{
|
||||
$moduleInfo->menu_srl = $menu_srl;
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->updateModule($moduleInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($node['list']) > 0)
|
||||
{
|
||||
$this->_recursiveUpdateMenuItem($node['list'], $menu_srl);
|
||||
|
|
@ -990,7 +1003,8 @@
|
|||
* @param string $mode 'move' or 'insert'
|
||||
* @return void
|
||||
*/
|
||||
function moveMenuItem($menu_srl,$parent_srl,$source_srl,$target_srl,$mode){
|
||||
function moveMenuItem($menu_srl, $parent_srl, $source_srl, $target_srl, $mode, $isShortcut='Y', $url=NULL)
|
||||
{
|
||||
// Get the original menus
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
|
||||
|
|
@ -1019,6 +1033,19 @@
|
|||
$args->menu_item_srl = $target_srl;
|
||||
$output = executeQuery('menu.updateMenuItemNode', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
//module's menu_srl move also
|
||||
if($isShortcut == 'N' && !empty($url))
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($url);
|
||||
if($menu_srl != $moduleInfo->menu_srl)
|
||||
{
|
||||
$moduleInfo->menu_srl = $menu_srl;
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->updateModule($moduleInfo);
|
||||
}
|
||||
}
|
||||
// Add a child
|
||||
} elseif($mode == 'insert') {
|
||||
$args->menu_item_srl = $target_srl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue