From 79992b49d4f3ab11339e7e04b3c34cf87cf9b7f6 Mon Sep 17 00:00:00 2001 From: remicollet Date: Tue, 17 Mar 2009 18:48:39 +0000 Subject: [PATCH] [example] add option to _check_config git-svn-id: https://forge.glpi-project.org/svn/example/trunk@69 349b9182-4a13-0410-896f-e5e9767dd1b3 --- setup.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/setup.php b/setup.php index fd036ff..1a7b0e5 100755 --- a/setup.php +++ b/setup.php @@ -205,8 +205,17 @@ function plugin_example_check_prerequisites(){ // Check configuration process for plugin : need to return true if succeeded -function plugin_example_check_config(){ - return true; +// Can display a message only if failure and $verbose is true +function plugin_example_check_config($verbose=false){ + global $LANG; + + if (true) { // Your configuration check + return true; + } + if ($verbose) { + echo $LANG['plugins'][2]; + } + return false; } // Define rights for the plugin types