[example] use registerPluginType

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@64 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
remicollet 2009-03-02 14:40:22 +00:00
parent cfbbc6eb99
commit 520e60a5d6
2 changed files with 11 additions and 2 deletions

View File

@ -43,7 +43,6 @@ if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){
} else { } else {
helpHeader("TITRE", $_SERVER['PHP_SELF']); helpHeader("TITRE", $_SERVER['PHP_SELF']);
} }
$_GET['target']=$_SERVER['PHP_SELF'];
checkTypeRight(PLUGIN_EXAMPLE_TYPE,"r"); checkTypeRight(PLUGIN_EXAMPLE_TYPE,"r");

View File

@ -108,7 +108,17 @@ function plugin_init_example() {
$PLUGIN_HOOKS['stats']['example'] = array('stat.php'=>'New stat', 'stat.php?other'=>'New stats 2',); $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 // 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
));
} }