diff --git a/hook.php b/hook.php
index 6df5555..ae8879d 100644
--- a/hook.php
+++ b/hook.php
@@ -224,12 +224,13 @@ function plugin_example_MassiveActions($type) {
// How to display specific actions ?
-function plugin_example_MassiveActionsDisplay($type,$action) {
+// options contain at least itemtype and and action
+function plugin_example_MassiveActionsDisplay($options=array()) {
global $LANG;
- switch ($type) {
+ switch ($options['itemtype']) {
case 'Computer' :
- switch ($action) {
+ switch ($options['action']) {
case "plugin_example_DoIt" :
echo " but do nothing :)";
@@ -238,7 +239,7 @@ function plugin_example_MassiveActionsDisplay($type,$action) {
break;
case 'PluginExampleExample' :
- switch ($action) {
+ switch ($options['action']) {
// No case for add_document : use GLPI core one
case "do_nothing" :
echo "