diff --git a/html/pages/device/ports.inc.php b/html/pages/device/ports.inc.php
index 7adf5b404..77ad6a856 100644
--- a/html/pages/device/ports.inc.php
+++ b/html/pages/device/ports.inc.php
@@ -55,7 +55,7 @@ if($_GET['optc'] == thumbs) {
if($_GET['opta'] == "details" ) { $port_details = 1; }
echo("
");
$i = "1";
- $interface_query = mysql_query("select * from interfaces WHERE device_id = '$_GET[id]' AND deleted = '0' ORDER BY `ifIndex` ASC");
+ $interface_query = mysql_query("select * from interfaces WHERE device_id = '".$device['device_id']."' AND deleted = '0' ORDER BY `ifIndex` ASC");
while($interface = mysql_fetch_array($interface_query)) {
include("includes/print-interface.inc.php");
$i++;
diff --git a/includes/discovery/interfaces.php b/includes/discovery/interfaces.php
index 7e7cdcf14..b7e84ad9f 100755
--- a/includes/discovery/interfaces.php
+++ b/includes/discovery/interfaces.php
@@ -35,12 +35,8 @@
# Add Interface
echo("+");
} else {
- if(isset($interface['deleted']) && $interface['deleted']) {
mysql_query("UPDATE `interfaces` SET `deleted` = '0' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'");
- echo("*");
- } else {
echo(".");
- }
}
$int_exists[] = "$ifIndex";
} else {