Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(setup): check methode before use it
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislas <[email protected]>
  • Loading branch information
stonebuzz committed Sep 25, 2020
1 parent eff5766 commit 6ad35b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
// Maximum GLPI version, exclusive
define('PLUGIN_FLYVEMDM_GLPI_MAX_VERSION', '9.4');

define('PLUGIN_FLYVEMDM_ROOT', GLPI_ROOT . '/'.Plugin::getWebDir("flyvemdm", false));
if (method_exists(Plugin::class, 'getWebDir')) {
define('PLUGIN_FLYVEMDM_ROOT', GLPI_ROOT . '/'.Plugin::getWebDir("flyvemdm", false));
} else {
define('PLUGIN_FLYVEMDM_ROOT', GLPI_ROOT . '/plugins/flyvemdm');
}

define('PLUGIN_FLYVEMDM_AGENT_DOWNLOAD_URL', 'https://play.google.com/store/apps/details?id=org.flyve.mdm.agent');

Expand Down

0 comments on commit 6ad35b7

Please sign in to comment.