mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 12:32:14 +09:00
issue 2670 when delete module type menu, delete target in shortcut type menu
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12159 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6cad95ae72
commit
601d6160d7
2 changed files with 22 additions and 4 deletions
|
|
@ -638,10 +638,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check start menu in originMenu
|
// check home menu in originMenu
|
||||||
$siteInfo = $oModuleModel->getSiteInfo($menuInfo->site_srl);
|
$siteInfo = $oModuleModel->getSiteInfo($menuInfo->site_srl);
|
||||||
$isStartmenuInclude = false;
|
$isStartmenuInclude = false;
|
||||||
$this->_checkStartMenuInOriginMenu($originMenu, $siteInfo->mid, $isStartmenuInclude);
|
$this->_checkHomeMenuInOriginMenu($originMenu, $siteInfo->mid, $isStartmenuInclude);
|
||||||
if($isStartmenuInclude)
|
if($isStartmenuInclude)
|
||||||
{
|
{
|
||||||
return new Object(-1, 'msg_cannot_delete_homemenu');
|
return new Object(-1, 'msg_cannot_delete_homemenu');
|
||||||
|
|
@ -666,7 +666,7 @@
|
||||||
$this->setRedirectUrl($returnUrl);
|
$this->setRedirectUrl($returnUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function _checkStartMenuInOriginMenu($originMenu, $startMid, &$isStartmenuInclude)
|
private function _checkHomeMenuInOriginMenu($originMenu, $startMid, &$isStartmenuInclude)
|
||||||
{
|
{
|
||||||
if($originMenu['url'] == $startMid)
|
if($originMenu['url'] == $startMid)
|
||||||
{
|
{
|
||||||
|
|
@ -677,7 +677,7 @@
|
||||||
{
|
{
|
||||||
foreach($originMenu['list'] AS $key=>$value)
|
foreach($originMenu['list'] AS $key=>$value)
|
||||||
{
|
{
|
||||||
$this->_checkStartMenuInOriginMenu($value, $startMid, $isStartmenuInclude);
|
$this->_checkHomeMenuInOriginMenu($value, $startMid, $isStartmenuInclude);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -707,6 +707,23 @@
|
||||||
$oModuleController = getController('module');
|
$oModuleController = getController('module');
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
||||||
|
// reference menu's url modify
|
||||||
|
$args->url = $node['url'];
|
||||||
|
$args->site_srl = $menuInfo->site_srl;
|
||||||
|
$args->is_shortcut = 'Y';
|
||||||
|
$output = executeQuery('menu.getMenuItemByUrl', $args);
|
||||||
|
if($output->data->menu_item_srl)
|
||||||
|
{
|
||||||
|
$output->data->url = '';
|
||||||
|
$referenceItem = $output->data;
|
||||||
|
$output = executeQuery('menu.updateMenuItem', $referenceItem);
|
||||||
|
if(!$output->toBool())
|
||||||
|
{
|
||||||
|
$oDB->rollback();
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$moduleInfo = $oModuleModel->getModuleInfoByMid($node['url'], $menuInfo->site_srl);
|
$moduleInfo = $oModuleModel->getModuleInfoByMid($node['url'], $menuInfo->site_srl);
|
||||||
if($moduleInfo->module_srl)
|
if($moduleInfo->module_srl)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
</columns>
|
</columns>
|
||||||
<conditions>
|
<conditions>
|
||||||
<condition operation="equal" column="MI.url" var="url" notnull="notnull" />
|
<condition operation="equal" column="MI.url" var="url" notnull="notnull" />
|
||||||
|
<condition operation="equal" column="MI.is_shortcut" var="is_shortcut" defaut="N" pipe="and" />
|
||||||
<query operation="in" column="MI.menu_srl" notnull="notnull" alias="getSiteSrl" pipe="and" >
|
<query operation="in" column="MI.menu_srl" notnull="notnull" alias="getSiteSrl" pipe="and" >
|
||||||
<tables>
|
<tables>
|
||||||
<table name="menu" alias="M" />
|
<table name="menu" alias="M" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue