mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@208 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -30,10 +30,9 @@
|
||||
if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = '1'; }
|
||||
if ($nullintf == 0) {
|
||||
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) == '0') {
|
||||
mysql_query("INSERT INTO `interfaces` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('$id','$ifIndex','$ifName')");
|
||||
echo("\n INSERT INTO `interfaces` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('".$device['device_id']."','$ifIndex','$ifName') \n ");
|
||||
mysql_query("INSERT INTO `interfaces` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('".$device['device_id']."','$ifIndex','$ifName')");
|
||||
# Add Interface
|
||||
echo("+" . mysql_error() . mysql_affected_rows());
|
||||
echo("+");
|
||||
} else {
|
||||
# Interface Already Exists
|
||||
echo(".");
|
||||
|
||||
Reference in New Issue
Block a user