@@ -467,7 +467,6 @@ function plugin_fusioninventory_check_prerequisites() {
467
467
468
468
if (version_compare (GLPI_VERSION , '0.84 ' , 'lt ' ) || version_compare (GLPI_VERSION , '0.85 ' , 'ge ' )) {
469
469
echo __ ('Your GLPI version not compatible, require 0.84 ' , 'fusioninventory ' );
470
-
471
470
return false ;
472
471
}
473
472
$ plugin = new Plugin ();
@@ -485,15 +484,16 @@ function plugin_fusioninventory_check_prerequisites() {
485
484
}
486
485
487
486
$ crontask = new CronTask ();
488
- if ((TableExists ("glpi_plugin_fusioninventory_agents " )
489
- AND !FieldExists ("glpi_plugin_fusioninventory_agents " , "tag " ))
490
- OR ($ crontask ->getFromDBbyName ('PluginFusioninventoryTaskjobstatus ' , 'cleantaskjob ' ))
491
- OR (TableExists ("glpi_plugin_fusioninventory_agentmodules " )
492
- AND FieldExists ("glpi_plugin_fusioninventory_agentmodules " , "url " ))) {
493
- $ DB ->query ("UPDATE `glpi_plugin_fusioninventory_configs` SET `value`='0.80+1.4' WHERE `type`='version' " );
494
- $ DB ->query ("UPDATE `glpi_plugins` SET `version`='0.80+1.4' WHERE `directory` LIKE 'fusi%' " );
487
+ if ($ plugin ->isActivated ("fusioninventory " )) {
488
+ if ((TableExists ("glpi_plugin_fusioninventory_agents " )
489
+ AND !FieldExists ("glpi_plugin_fusioninventory_agents " , "tag " ))
490
+ OR ($ crontask ->getFromDBbyName ('PluginFusioninventoryTaskjobstatus ' , 'cleantaskjob ' ))
491
+ OR (TableExists ("glpi_plugin_fusioninventory_agentmodules " )
492
+ AND FieldExists ("glpi_plugin_fusioninventory_agentmodules " , "url " ))) {
493
+ $ DB ->query ("UPDATE `glpi_plugin_fusioninventory_configs` SET `value`='0.80+1.4' WHERE `type`='version' " );
494
+ $ DB ->query ("UPDATE `glpi_plugins` SET `version`='0.80+1.4' WHERE `directory` LIKE 'fusi%' " );
495
+ }
495
496
}
496
-
497
497
return true ;
498
498
}
499
499
0 commit comments