syntaxer run

git-svn-id: http://www.observium.org/svn/observer/trunk@3147 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-05-07 16:23:43 +00:00
parent 56b2b49089
commit 6a1cce6090
8 changed files with 42 additions and 43 deletions

View File

@@ -60,7 +60,7 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
$links = dbFetch("SELECT * from ports AS I, links AS L WHERE I.device_id = ? AND L.local_interface_id = I.interface_id ORDER BY L.remote_hostname", array($device['device_id']));
if (count($links))
{
if($anon) { $device['hostname'] = md5($device['hostname']); }
if ($anon) { $device['hostname'] = md5($device['hostname']); }
if (!isset($locations[$device['location']])) { $locations[$device['location']] = $loc_count; $loc_count++; }
$loc_id = $locations[$device['location']];
@@ -95,17 +95,17 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
}
$src = $device['hostname'];
if($anon) { $src = md5($src); }
if ($anon) { $src = md5($src); }
if ($remote_interface_id)
{
$dst = dbFetchCell("SELECT `hostname` FROM `devices` AS D, `ports` AS I WHERE I.interface_id = ? AND D.device_id = I.device_id", array($remote_interface_id));
$dst = dbFetchCell("SELECT `hostname` FROM `devices` AS D, `ports` AS I WHERE I.interface_id = ? AND D.device_id = I.device_id", array($remote_interface_id));
$dst_host = dbFetchCell("SELECT D.device_id FROM `devices` AS D, `ports` AS I WHERE I.interface_id = ? AND D.device_id = I.device_id", array($remote_interface_id));
} else {
unset($dst_host);
$dst = $link['remote_hostname'];
}
if($anon) { $dst = md5($dst); $src = md5($src);}
if ($anon) { $dst = md5($dst); $src = md5($src);}
$sif = ifNameDescr(dbFetchRow("SELECT * FROM ports WHERE `interface_id` = ?", array($link['local_interface_id'])),$device);
if ($remote_interface_id)