mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated most files to use dbFacile
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
$interface = mysql_fetch_assoc(mysql_query("SELECT * FROM `ports` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '".$entry[2]."'"));
|
||||
$interface = dbFetchRow("SELECT * FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ?",array($device['device_id'],$entry[2]));
|
||||
|
||||
if (!$interface) { exit; }
|
||||
|
||||
@@ -16,7 +16,7 @@ log_event("SNMP Trap: linkDown " . $interface['ifDescr'], $device, "interface",
|
||||
if ($ifOperStatus != $interface['ifOperStatus'])
|
||||
{
|
||||
log_event("Interface went Down : " . $interface['ifDescr'] . " (TRAP)", $device, "interface", $interface['port_id']);
|
||||
mysql_query("UPDATE `ports` SET ifOperStatus = 'down' WHERE `port_id` = '".$interface['port_id']."'");
|
||||
dbUpdate(array('`ifOperStatus`' => 'down'), 'ports', 'port_id=?',array($interface['port_id']));
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user