From 773a666d12b869cf9afc78d8f99c9f0061a45eb7 Mon Sep 17 00:00:00 2001 From: ovclas Date: Mon, 10 Sep 2012 07:19:37 +0000 Subject: [PATCH] issue 2362 add homepage mid git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11192 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/menu/menu.admin.model.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/menu/menu.admin.model.php b/modules/menu/menu.admin.model.php index b1d0680fd..9d605aba3 100644 --- a/modules/menu/menu.admin.model.php +++ b/modules/menu/menu.admin.model.php @@ -303,6 +303,10 @@ $args = Context::getRequestVars(); $menuSrl = Context::get('menuSrl'); + $oModuleModel = &getModel('module'); + $columnList = array('modules.mid', 'modules.browser_title', 'sites.index_module_srl'); + $start_module = $oModuleModel->getSiteInfo(0, $columnList); + $menuList = array(); if($menuSrl) { @@ -314,7 +318,7 @@ { foreach($menu->list AS $key=>$value) { - $this->_menuInfoSetting($menu->list[$key]); + $this->_menuInfoSetting($menu->list[$key], $start_module); } } @@ -342,7 +346,7 @@ { foreach($menu->list AS $key2=>$value2) { - $this->_menuInfoSetting($menu->list[$key2]); + $this->_menuInfoSetting($menu->list[$key2], $start_module); } } @@ -362,10 +366,10 @@ * @param array $menu * @return void */ - private function _menuInfoSetting(&$menu) + private function _menuInfoSetting(&$menu, &$start_module) { $oModuleModel = &getModel('module'); - if(!preg_match('/^http/i', $menu['url'])) + if(!empty($menu['url']) && !preg_match('/^http/i', $menu['url'])) { unset($midInfo); unset($moduleInfo); @@ -376,6 +380,10 @@ $menu['module_srl'] = $midInfo->module_srl; $menu['setup_index_act'] = $moduleInfo->setup_index_act; } + if($midInfo->mid == $start_module->mid) + { + $menu['is_start_module'] = true; + } // setting layout srl for layout management $menu['layout_srl'] = $midInfo->layout_srl; } @@ -383,7 +391,7 @@ { foreach($menu['list'] AS $key=>$value) { - $this->_menuInfoSetting($menu['list'][$key]); + $this->_menuInfoSetting($menu['list'][$key], &$start_module); } } }