mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°5085 - Move menu is impossible - Error after compilation
This commit is contained in:
committed by
bdalsass
parent
146ed0f6a6
commit
2b84c0384d
@@ -487,11 +487,14 @@ EOF;
|
||||
foreach($aMenusByModule[$sModuleName] as $sMenuId)
|
||||
{
|
||||
$oMenuNode = $aMenuNodes[$sMenuId];
|
||||
if ($sParent = $oMenuNode->GetChildText('parent', null))
|
||||
{
|
||||
$aMenusToLoad[] = $sParent;
|
||||
$aParentMenus[] = $sParent;
|
||||
// compute parent hierarchy
|
||||
$aParentIdHierarchy = [];
|
||||
while ($sParent = $oMenuNode->GetChildText('parent', null)) {
|
||||
array_unshift($aParentIdHierarchy, $sParent);
|
||||
$oMenuNode = $aMenuNodes[$sParent];
|
||||
}
|
||||
$aMenusToLoad = array_merge($aMenusToLoad, $aParentIdHierarchy);
|
||||
$aParentMenus = array_merge($aParentMenus, $aParentIdHierarchy);
|
||||
// Note: the order matters: the parents must be defined BEFORE
|
||||
$aMenusToLoad[] = $sMenuId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user