From 1e4d4374413ac22d0320b4879314752cb0e9b739 Mon Sep 17 00:00:00 2001 From: moyooo Date: Thu, 17 May 2007 16:21:02 +0000 Subject: [PATCH] Clean git-svn-id: https://forge.glpi-project.org/svn/example/trunk@19 349b9182-4a13-0410-896f-e5e9767dd1b3 --- setup.php | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/setup.php b/setup.php index cdf904c..19e0a31 100755 --- a/setup.php +++ b/setup.php @@ -46,23 +46,23 @@ function plugin_init_example() { $PLUGIN_HOOKS['submenu_entry']['example'][$LANGEXAMPLE["test"]] = 'index.php'; $PLUGIN_HOOKS["helpdesk_menu_entry"]['example'] = true; - // Setup/Update functions - $PLUGIN_HOOKS['setup']['example'] = "plugin_setup_example"; - // Config function - $PLUGIN_HOOKS['config']['example'] = 'plugin_config_example'; + // Config page $PLUGIN_HOOKS['config_page']['example'] = 'config.php'; + + // Onglets management + $PLUGIN_HOOKS['headings']['example'] = 'plugin_get_headings_example'; + $PLUGIN_HOOKS['headings_action']['example'] = 'plugin_headings_actions_example'; + // Display on central page + $PLUGIN_HOOKS['central_action']['example'] = 'plugin_central_action_example'; + // Item action event // See config.php for defined ITEM_TYPE $PLUGIN_HOOKS['item_update']['example'] = 'plugin_item_update_example'; $PLUGIN_HOOKS['item_add']['example'] = 'plugin_item_add_example'; $PLUGIN_HOOKS['item_delete']['example'] = 'plugin_item_delete_example'; $PLUGIN_HOOKS['item_purge']['example'] = 'plugin_item_purge_example'; $PLUGIN_HOOKS['item_restore']['example'] = 'plugin_item_restore_example'; - // Onglets management - $PLUGIN_HOOKS['headings']['example'] = 'plugin_get_headings_example'; - $PLUGIN_HOOKS['headings_action']['example'] = 'plugin_headings_actions_example'; - // Display on central page - $PLUGIN_HOOKS['central_action']['example'] = 'plugin_central_action_example'; + // Cron action $PLUGIN_HOOKS['cron']['example'] = DAY_TIMESTAMP; //redirect appel http://localhost/glpi/index.php?redirect=plugin_example_2 (ID 2 du form) @@ -81,20 +81,6 @@ function plugin_version_example(){ 'version' => '0.0.1'); } -// Get config of the plugin -function plugin_config_example(){ - global $CFG_GLPI_PLUGINS; - - $CFG_GLPI_PLUGINS["example"]["test"]="test"; -} - -// Config form od the plugin -function plugin_config_form_example(){ - - echo "This is the form config of the plugin"; - -} - // Hook done on update item case function plugin_item_update_example($parm){