Pass the final class to GetShortcutActions

SVN:trunk[1498]
This commit is contained in:
Denis Flaven
2011-08-23 13:56:09 +00:00
parent 0a2c9d0e37
commit 264af56591
2 changed files with 4 additions and 3 deletions

View File

@@ -2146,8 +2146,10 @@ EOF
/**
* Get the list of actions to be displayed as 'shortcuts' (i.e buttons) instead of inside the Actions popup menu
* @param $sFinalClass string The actual class of the objects for which to display the menu
* @return Array the list of menu codes (i.e dictionary entries) that can be displayed as shortcuts next to the actions menu
*/
public static function GetShortcutActions()
public static function GetShortcutActions($sFinalClass)
{
return array('UI:Menu:New', 'UI:Menu:Modify');
}

View File

@@ -1228,9 +1228,8 @@ class MenuBlock extends DisplayBlock
}
}
$aFavoriteActions = array();
$aFavorites = array('UI:Menu:Modify', 'UI:Menu:New', /*'UI:Menu:Delete'*/);
$aCallSpec = array($sClass, 'GetShortcutActions');
$aShortcutActions = call_user_func($aCallSpec);
$aShortcutActions = call_user_func($aCallSpec, $sClass);
foreach ($aActions as $key => $aAction)
{
if (in_array($key, $aShortcutActions))