GLPI 9.4 compatibility

- Use ITILFollowup in replacement of TicketFollowup
This commit is contained in:
Cédric Anne
2018-11-27 10:01:19 +01:00
parent 6b3334ecfd
commit 511aba6951
3 changed files with 12 additions and 13 deletions

View File

@ -232,8 +232,7 @@ function plugin_version_example() {
'homepage' => 'https://github.com/pluginsGLPI/example',
'requirements' => [
'glpi' => [
'min' => '9.3',
'dev' => true
'min' => '9.4',
]
]
];
@ -248,12 +247,12 @@ function plugin_version_example() {
*/
function plugin_example_check_prerequisites() {
$version = rtrim(GLPI_VERSION, '-dev');
if (version_compare($version, '9.3', 'lt')) {
echo "This plugin requires GLPI 9.3";
//Version check is not done by core in GLPI < 9.2 but has to be delegated to core in GLPI >= 9.2.
$version = preg_replace('/^((\d+\.?)+).*$/', '$1', GLPI_VERSION);
if (version_compare($version, '9.2', '<')) {
echo "This plugin requires GLPI >= 9.4";
return false;
}
return true;
}