From a413968eb8c2f908ea4e5ece77efb388964f1bcf Mon Sep 17 00:00:00 2001 From: laf Date: Sun, 23 Aug 2015 20:06:28 +0000 Subject: [PATCH 1/2] Also use ifHighSpeed if ifSpeed is 0 and ifHighSpeed exists --- includes/polling/ports.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index ec4aa092fa..b05003679b 100644 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -289,7 +289,7 @@ foreach ($ports as $port) { } // Overwrite ifSpeed with ifHighSpeed if it's over 1G - if (is_numeric($this_port['ifHighSpeed']) && $this_port['ifSpeed'] > '1000000000') { + if ((is_numeric($this_port['ifHighSpeed']) && $this_port['ifSpeed'] > '1000000000') || (is_numeric($this_port['ifHighSpeed']) && $this_port['ifSpeed'] == 0)) { echo 'HighSpeed '; $this_port['ifSpeed'] = ($this_port['ifHighSpeed'] * 1000000); } From 0baa0d81e22db22206035291615c4cd174a61f5c Mon Sep 17 00:00:00 2001 From: laf Date: Sun, 23 Aug 2015 21:39:37 +0000 Subject: [PATCH 2/2] Reworked if check --- includes/polling/ports.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index b05003679b..c102a664b0 100644 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -289,7 +289,7 @@ foreach ($ports as $port) { } // Overwrite ifSpeed with ifHighSpeed if it's over 1G - if ((is_numeric($this_port['ifHighSpeed']) && $this_port['ifSpeed'] > '1000000000') || (is_numeric($this_port['ifHighSpeed']) && $this_port['ifSpeed'] == 0)) { + if (is_numeric($this_port['ifHighSpeed']) && ($this_port['ifSpeed'] > '1000000000' || $this_port['ifSpeed'] == 0)) { echo 'HighSpeed '; $this_port['ifSpeed'] = ($this_port['ifHighSpeed'] * 1000000); }