mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 13:52:24 +09:00
#398 불필요한 코드 제거
This commit is contained in:
parent
c88d99aaef
commit
8f0a2a80c5
1 changed files with 19 additions and 43 deletions
|
|
@ -138,19 +138,15 @@ class adminAdminView extends admin
|
|||
$lang->menu_gnb_sub = $oAdminAdminModel->getAdminMenuLang();
|
||||
|
||||
$result = $oAdminAdminModel->checkAdminMenu();
|
||||
if(!$result->php_file)
|
||||
{
|
||||
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
|
||||
Context::close();
|
||||
exit;
|
||||
}
|
||||
include $result->php_file;
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
|
||||
|
||||
// get current menu's subMenuTitle
|
||||
$moduleActionInfo = $oModuleModel->getModuleActionXml($module);
|
||||
$currentAct = Context::get('act');
|
||||
$subMenuTitle = '';
|
||||
|
||||
foreach((array) $moduleActionInfo->menu as $key => $value)
|
||||
{
|
||||
if(isset($value->acts) && is_array($value->acts) && in_array($currentAct, $value->acts))
|
||||
|
|
@ -159,50 +155,30 @@ class adminAdminView extends admin
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// get current menu's srl(=parentSrl)
|
||||
$parentSrl = 0;
|
||||
$oMenuAdminConroller = getAdminController('menu');
|
||||
if(!$_SESSION['isMakeXml'])
|
||||
foreach((array) $menu->list as $parentKey => $parentMenu)
|
||||
{
|
||||
foreach((array) $menu->list as $parentKey => $parentMenu)
|
||||
if(!is_array($parentMenu['list']) || !count($parentMenu['list']))
|
||||
{
|
||||
if(!$parentMenu['text'])
|
||||
{
|
||||
$oMenuAdminConroller->makeXmlFile($result->menu_srl);
|
||||
$_SESSION['isMakeXml'] = true;
|
||||
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
|
||||
Context::close();
|
||||
exit;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if($parentMenu['href'] == '#' && count($parentMenu['list']))
|
||||
{
|
||||
$firstChild = current($parentMenu['list']);
|
||||
$menu->list[$parentKey]['href'] = $firstChild['href'];
|
||||
}
|
||||
|
||||
if(!is_array($parentMenu['list']) || !count($parentMenu['list']))
|
||||
foreach($parentMenu['list'] as $childKey => $childMenu)
|
||||
{
|
||||
if($subMenuTitle == $childMenu['text'])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if($parentMenu['href'] == '#' && count($parentMenu['list']))
|
||||
{
|
||||
$firstChild = current($parentMenu['list']);
|
||||
$menu->list[$parentKey]['href'] = $firstChild['href'];
|
||||
}
|
||||
|
||||
foreach($parentMenu['list'] as $childKey => $childMenu)
|
||||
{
|
||||
if(!$childMenu['text'])
|
||||
{
|
||||
$oMenuAdminConroller->makeXmlFile($result->menu_srl);
|
||||
$_SESSION['isMakeXml'] = true;
|
||||
header('Location: ' . getNotEncodedUrl('', 'module', 'admin'));
|
||||
Context::close();
|
||||
exit;
|
||||
}
|
||||
|
||||
if($subMenuTitle == $childMenu['text'])
|
||||
{
|
||||
$parentSrl = $childMenu['parent_srl'];
|
||||
break;
|
||||
}
|
||||
$parentSrl = $childMenu['parent_srl'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if($parentSrl) break;
|
||||
}
|
||||
|
||||
// Admin logo, title setup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue