From 35060ead05684c188d03257cabc26171c22fac06 Mon Sep 17 00:00:00 2001 From: remicollet Date: Thu, 14 May 2009 06:58:37 +0000 Subject: [PATCH] [example] add test for create mode + add tab on COMPUTERDISK git-svn-id: https://forge.glpi-project.org/svn/example/trunk@78 349b9182-4a13-0410-896f-e5e9767dd1b3 --- hook.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hook.php b/hook.php index 65547bb..7dd52fa 100644 --- a/hook.php +++ b/hook.php @@ -541,11 +541,14 @@ function plugin_get_headings_example($type,$ID,$withtemplate){ ); } break; + case COMPUTERDISK_TYPE : case ENTERPRISE_TYPE : - return array( - 1 => "Test PLugin", - 2 => "Test PLugin 2", - ); + if ($ID>0) { // Not in create mode + return array( + 1 => "Test PLugin", + 2 => "Test PLugin 2", + ); + } break; case "central": return array( @@ -578,6 +581,7 @@ function plugin_headings_actions_example($type){ ); break; + case COMPUTERDISK_TYPE : case ENTERPRISE_TYPE : return array( 1 => "plugin_headings_example",