File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 <version >
3030 <num >{VERSION}</num >
3131 <!-- Add as many compatibility tag you want -->
32+ <compatibility >9.4</compatibility >
3233 <compatibility >9.3</compatibility >
3334 <compatibility >9.2</compatibility >
3435 </version >
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ function plugin_version_{LNAME}() {
5757 'requirements' => [
5858 'glpi' => [
5959 'min' => '9.2',
60- 'dev' => true
6160 ]
6261 ]
6362 ];
@@ -70,13 +69,11 @@ function plugin_version_{LNAME}() {
7069 * @return boolean
7170 */
7271function plugin_{ LNAME} _check_prerequisites() {
73- // Strict version check (could be less strict, or could allow various version)
74- if (version_compare(GLPI_VERSION, ' 9.2' , ' lt' )) {
75- if (method_exists(' Plugin' , ' messageIncompatible' )) {
76- echo Plugin::messageIncompatible(' core' , ' 9.2' );
77- } else {
78- echo " This plugin requires GLPI >= 9.2" ;
79- }
72+
73+ //Version check is not done by core in GLPI < 9.2 but has to be delegated to core in GLPI >= 9.2.
74+ $version = preg_replace(' /^((\d +\. ?)+).*$/' , ' $1' , GLPI_VERSION);
75+ if (version_compare($version , ' 9.2' , ' <' )) {
76+ echo " This plugin requires GLPI >= 9.2" ;
8077 return false ;
8178 }
8279 return true;
You can’t perform that action at this time.
0 commit comments