#745 Default menu is not computed correctly (depends on the customizations made to the menu -> order of declaration)

SVN:trunk[2882]
This commit is contained in:
Romain Quetiez
2013-10-08 14:27:27 +00:00
parent 4b9e6edab8
commit e08fa6b43b

View File

@@ -300,7 +300,9 @@ class ApplicationMenu
// Make sure the root menu is sorted on 'rank'
usort(self::$aRootMenus, array('ApplicationMenu', 'CompareOnRank'));
$oFirstGroup = self::GetMenuNode(self::$aRootMenus[0]['index']);
$oMenuNode = self::GetMenuNode(self::$aMenusIndex[$oFirstGroup->GetIndex()]['children'][0]['index']);
$aChildren = self::$aMenusIndex[$oFirstGroup->GetIndex()]['children'];
usort($aChildren, array('ApplicationMenu', 'CompareOnRank'));
$oMenuNode = self::GetMenuNode($aChildren[0]['index']);
$sMenuId = $oMenuNode->GetMenuId();
}
return $sMenuId;