Skip to content

Commit 8797168

Browse files
author
David Durieux
committed
Some fixes
1 parent 8ebb29c commit 8797168

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

fusioninventory/hook.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,6 @@ function plugin_fusioninventory_giveItem($type, $id, $data, $num) {
620620
}
621621
break;
622622

623-
// * Detail of ports history (plugins/fusinvsnmp/report/switch_ports.history.php)
624623
case 'PluginFusioninventoryNetworkPortLog' :
625624
switch ($table.'.'.$field) {
626625

@@ -2525,7 +2524,6 @@ function plugin_fusioninventory_addWhere($link, $nott, $type, $id, $val) {
25252524

25262525
break;
25272526

2528-
// * Detail of ports history (plugins/fusinvsnmp/report/switch_ports.history.php)
25292527
case 'PluginFusioninventoryNetworkPortLog' :
25302528
switch ($table.".".$field) {
25312529

fusioninventory/inc/networkportlog.class.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -513,11 +513,6 @@ static function showHistory($ID_port) {
513513
}
514514
}
515515

516-
$text .= "<tr class='tab_bg_1'>";
517-
$text .= "<th colspan='8'>";
518-
$text .= "<a href='".$CFG_GLPI['root_doc']."/plugins/fusioninventory/report/switch_ports.history.php?networkports_id=".$ID_port."'>Voir l'historique complet</a>";
519-
$text .= "</th>";
520-
$text .= "</tr>";
521516
$text .= "</table>";
522517
return $text;
523518
}

fusioninventory/setup.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ function plugin_fusioninventory_check_prerequisites() {
467467

468468
if (version_compare(GLPI_VERSION, '0.84', 'lt') || version_compare(GLPI_VERSION, '0.85', 'ge')) {
469469
echo __('Your GLPI version not compatible, require 0.84', 'fusioninventory');
470-
471470
return false;
472471
}
473472
$plugin = new Plugin();
@@ -485,15 +484,16 @@ function plugin_fusioninventory_check_prerequisites() {
485484
}
486485

487486
$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+
}
495496
}
496-
497497
return true;
498498
}
499499

0 commit comments

Comments
 (0)