mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-30 15:52:17 +09:00
#225 temporary menu 처리
This commit is contained in:
parent
bd4372aff9
commit
5b063c10ad
2 changed files with 43 additions and 31 deletions
|
|
@ -39,6 +39,15 @@ class menu extends ModuleObject
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$args = new stdClass();
|
||||
$args->title = array("Temporary menu");
|
||||
$temp_menus = executeQueryArray('menu.getMenuByTitle', $args);
|
||||
if($temp_menus->toBool() && count($temp_menus->data)) return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -135,6 +144,33 @@ class menu extends ModuleObject
|
|||
|
||||
$this->recompileCache();
|
||||
}
|
||||
|
||||
// for 1.7.4 update, 기존에 생성된 Temporary menu 항목 정리
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
$args = new stdClass();
|
||||
$args->title = array("Temporary menu");
|
||||
$temp_menus = executeQueryArray('menu.getMenuByTitle', $args);
|
||||
|
||||
$args = new stdClass();
|
||||
if($temp_menus->toBool() && count($temp_menus->data))
|
||||
{
|
||||
|
||||
$oMenuAdminController = getAdminController('menu');
|
||||
foreach($temp_menus->data as $menu)
|
||||
{
|
||||
$args->current_menu_srl = $menu->menu_srl;
|
||||
$args->menu_srl = $oMenuAdminController->getUnlinkedMenu();
|
||||
$output3 = executeQuery('menu.updateMenuItems', $args);
|
||||
|
||||
if($output3->toBool())
|
||||
{
|
||||
// delete
|
||||
$oMenuAdminController->deleteMenu($menu->menu_srl);
|
||||
}
|
||||
}
|
||||
|
||||
$this->recompileCache();
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue