Skip to content

Commit

Permalink
Bump version, compat
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Sep 22, 2017
1 parent 56b2640 commit a9a32ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
20 changes: 11 additions & 9 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
--------------------------------------------------------------------------
*/

define('PLUGIN_XIVO_VERSION', '0.1.0');
define('PLUGIN_XIVO_VERSION', '0.2.0');

if (!defined("PLUGINXIVO_DIR")) {
define("PLUGINXIVO_DIR", GLPI_ROOT . "/plugins/xivo");
Expand Down Expand Up @@ -103,7 +103,12 @@ function plugin_version_xivo() {
'author' => '<a href="http://www.teclib.com">Teclib\'</a>',
'license' => '',
'homepage' => '',
'minGlpiVersion' => '9.1'
'requirements' => [
'glpi' => [
'min' => '9.2',
'dev' => true
]
]
];
}

Expand All @@ -114,15 +119,12 @@ function plugin_version_xivo() {
* @return boolean
*/
function plugin_xivo_check_prerequisites() {
// Strict version check (could be less strict, or could allow various version)
if (version_compare(GLPI_VERSION, '9.1', 'lt')) {
if (method_exists('Plugin', 'messageIncompatible')) {
echo Plugin::messageIncompatible('core', '9.1');
} else {
echo "This plugin requires GLPI >= 9.1";
}
$version = rtrim(GLPI_VERSION, '-dev');
if (version_compare($version, '9.2', 'lt')) {
echo "This plugin requires GLPI 9.2";
return false;
}

return true;
}

Expand Down
4 changes: 4 additions & 0 deletions xivo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Merci de contacter Teclib par mail ([email protected]) ou par téléphone (0
<author>Alexandre Delaunay</author>
</authors>
<versions>
<version>
<num>0.2.0</num>
<compatibility>9.2</compatibility>
</version>
<version>
<num>0.1.0</num>
<compatibility>9.1</compatibility>
Expand Down

0 comments on commit a9a32ae

Please sign in to comment.