diff --git a/plugin.xml b/plugin.xml index 7ab3a4f..eaf54db 100644 --- a/plugin.xml +++ b/plugin.xml @@ -26,8 +26,11 @@ - 2.0.1 + 2.1.0 9.2 + + + 2.0.1 9.1.2 diff --git a/setup.php b/setup.php index 9ff1b40..751ca2a 100644 --- a/setup.php +++ b/setup.php @@ -26,7 +26,7 @@ -------------------------------------------------------------------------- */ -define ('PLUGIN_TAG_VERSION', '2.0.1'); +define ('PLUGIN_TAG_VERSION', '2.1.0'); /** * Check configuration process @@ -110,12 +110,19 @@ function plugin_init_tag() { * @return array */ function plugin_version_tag() { - return array('name' => __('Tag Management', 'tag'), - 'version' => PLUGIN_TAG_VERSION, - 'author' => 'Teclib\' - Infotel conseil', - 'homepage' => 'https://github.com/pluginsGLPI/tag', - 'license' => 'GPLv2+', - 'minGlpiVersion' => "9.1.2"); + return [ + 'name' => __('Tag Management', 'tag'), + 'version' => PLUGIN_TAG_VERSION, + 'author' => 'Teclib\' - Infotel conseil', + 'homepage' => 'https://github.com/pluginsGLPI/tag', + 'license' => 'GPLv2+', + 'requirements' => [ + 'glpi' => [ + 'min' => '9.2', + 'dev' => true + ] + ] + ]; } /** @@ -125,14 +132,11 @@ function plugin_version_tag() { * @return boolean */ function plugin_tag_check_prerequisites() { - if (version_compare(GLPI_VERSION, '9.1.2', 'lt')) { - if (method_exists('Plugin', 'messageIncompatible')) { - echo Plugin::messageIncompatible('core', '9.1.2'); - } else { - echo __('This plugin requires GLPI >= 9.1.2'); - } - } else { - return true; + $version = rtrim(GLPI_VERSION, '-dev'); + if (version_compare($version, '9.2', 'lt')) { + echo "This plugin requires GLPI 9.2"; + return false; } - return false; + + return true; }