From 520e60a5d68f2132b9164c4b8214e88f3a2821b0 Mon Sep 17 00:00:00 2001 From: remicollet Date: Mon, 2 Mar 2009 14:40:22 +0000 Subject: [PATCH] [example] use registerPluginType git-svn-id: https://forge.glpi-project.org/svn/example/trunk@64 349b9182-4a13-0410-896f-e5e9767dd1b3 --- index.php | 1 - setup.php | 12 +++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 5a8eeb5..47e1197 100755 --- a/index.php +++ b/index.php @@ -43,7 +43,6 @@ if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){ } else { helpHeader("TITRE", $_SERVER['PHP_SELF']); } -$_GET['target']=$_SERVER['PHP_SELF']; checkTypeRight(PLUGIN_EXAMPLE_TYPE,"r"); diff --git a/setup.php b/setup.php index a9ec91f..dab05fb 100755 --- a/setup.php +++ b/setup.php @@ -108,7 +108,17 @@ function plugin_init_example() { $PLUGIN_HOOKS['stats']['example'] = array('stat.php'=>'New stat', 'stat.php?other'=>'New stats 2',); // Params : plugin name - string type - ID - class - table - form page - Type name - pluginNewType('example',"PLUGIN_EXAMPLE_TYPE",1001,"pluginExample","glpi_plugin_example","example.form.php","Example Type"); + registerPluginType('example', 'PLUGIN_EXAMPLE_TYPE', 1001, array( + 'classname' => 'pluginExample', + 'tablename' => 'glpi_plugin_example', + 'formpage' => 'example.form.php', + 'searchpage' => 'index.php', + 'typename' => 'Example Type', + 'deleted_tables' => false, + 'template_tables' => false, + 'specif_entities_tables' => false, + 'recursive_type' => false + )); }