mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Fixed regression (shortcut actions, display a list of objects not deriving from cmdbAbstract)
SVN:trunk[1510]
This commit is contained in:
@@ -1229,15 +1229,22 @@ class MenuBlock extends DisplayBlock
|
||||
}
|
||||
$aFavoriteActions = array();
|
||||
$aCallSpec = array($sClass, 'GetShortcutActions');
|
||||
$aShortcutActions = call_user_func($aCallSpec, $sClass);
|
||||
foreach ($aActions as $key => $aAction)
|
||||
if (is_callable($aCallSpec))
|
||||
{
|
||||
if (in_array($key, $aShortcutActions))
|
||||
$aShortcutActions = call_user_func($aCallSpec, $sClass);
|
||||
foreach ($aActions as $key => $aAction)
|
||||
{
|
||||
$aFavoriteActions[] = $aAction;
|
||||
unset($aActions[$key]);
|
||||
if (in_array($key, $aShortcutActions))
|
||||
{
|
||||
$aFavoriteActions[] = $aAction;
|
||||
unset($aActions[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$aShortcutActions = array();
|
||||
}
|
||||
|
||||
if (count($aFavoriteActions) > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user