Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 128ff3b

Browse files
committed
bump version - prepare 4.0.0 release for glpi 9.2
1 parent 1b02bc3 commit 128ff3b

File tree

2 files changed

+27
-41
lines changed

2 files changed

+27
-41
lines changed

mantis.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
<author>TECLIB'</author>
4343
</authors>
4444
<versions>
45+
<version>
46+
<num>4.0.0</num>
47+
<compatibility>9.2</compatibility>
48+
</version>
4549
<version>
4650
<num>3.0.0</num>
4751
<compatibility>0.85</compatibility>

setup.php

Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
--------------------------------------------------------------------------
3232
*/
3333

34-
define("PLUGIN_MANTIS_VERSION", "3.0.2");
34+
define("PLUGIN_MANTIS_VERSION", "4.0.0");
3535

3636
// Minimal GLPI version, inclusive
37-
define("PLUGIN_MANTIS_MIN_GLPI", "9.1");
37+
define("PLUGIN_MANTIS_MIN_GLPI", "9.2");
3838
// Maximum GLPI version, exclusive
3939
define("PLUGIN_MANTIS_MAX_GLPI", "9.3");
4040

@@ -87,57 +87,39 @@ function plugin_init_mantis() {
8787
* @return array
8888
*/
8989
function plugin_version_mantis() {
90-
return array(
91-
'name' => __("MantisBT synchronization", "mantis"),
92-
'version' => PLUGIN_MANTIS_VERSION,
93-
'author' => 'TECLIB\'',
94-
'license' => 'GPLv3',
95-
'homepage' => 'https://github.com/pluginsGLPI/mantis',
96-
'minGlpiVersion' => PLUGIN_MANTIS_MIN_GLPI
97-
);
90+
91+
return [
92+
'name' => __("MantisBT synchronization", "mantis"),
93+
'version' => PLUGIN_MANTIS_VERSION,
94+
'author' => 'TECLIB\'',
95+
'license' => 'GPLv3',
96+
'homepage'=>'https://github.com/pluginsGLPI/mantis',
97+
'requirements' => [
98+
'glpi' => [
99+
'min' => PLUGIN_MANTIS_MIN_GLPI,
100+
'max' => PLUGIN_MANTIS_MAX_GLPI,
101+
'dev' => true
102+
]
103+
]
104+
];
98105
}
99106

100107
/**
101-
* function to check the prerequisites
108+
* Check pre-requisites before install
102109
*
103110
* @return boolean
104111
*/
105112
function plugin_mantis_check_prerequisites() {
106-
if (version_compare(GLPI_VERSION, PLUGIN_MANTIS_MIN_GLPI, 'lt')
107-
|| version_compare(GLPI_VERSION, PLUGIN_MANTIS_MAX_GLPI, 'ge')
108-
) {
109-
echo sprintf(
110-
__('This plugin requires GLPi > %1$s and < %2$s'),
111-
PLUGIN_MANTIS_MIN_GLPI,
112-
PLUGIN_MANTIS_MAX_GLPI
113-
);
114-
115-
return false;
116-
}
117-
118-
if (!extension_loaded('soap')) {
119-
_e("This plugin requires SOAP extension for PHP");
120-
return false;
121-
}
122-
123113
return true;
124114
}
125115

126116
/**
127-
* function to check the initial configuration
117+
* Check configuration process
118+
*
119+
* @param boolean $verbose Whether to display message on failure. Defaults to false
128120
*
129-
* @param boolean $verbose
130121
* @return boolean
131122
*/
132123
function plugin_mantis_check_config($verbose = false) {
133-
if (true) {
134-
// your configuration check
135-
return true;
136-
}
137-
138-
if ($verbose) {
139-
echo _x('plugin', 'Installed / not configured');
140-
}
141-
142-
return false;
143-
}
124+
return true;
125+
}

0 commit comments

Comments
 (0)