mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 16:26:55 +02:00
minor cleanups, also don't send png mime header when doing graph debug, firefox won't show the debug text then
git-svn-id: http://www.observium.org/svn/observer/trunk@1919 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+2
-1
@@ -67,7 +67,8 @@ while ($row = mysql_fetch_array($data))
|
|||||||
$response = explode(" ", snmp_get($row, "ifIndex.$index", "-Osq"));
|
$response = explode(" ", snmp_get($row, "ifIndex.$index", "-Osq"));
|
||||||
$response = $response[1];
|
$response = $response[1];
|
||||||
|
|
||||||
if ($response != $index) {
|
if ($response != $index)
|
||||||
|
{
|
||||||
mysql_query("DELETE from ports where interface_id = '" . $row['interface_id'] . "'");
|
mysql_query("DELETE from ports where interface_id = '" . $row['interface_id'] . "'");
|
||||||
mysql_query("DELETE from `adjacencies` WHERE `interface_id` = '" . $row['interface_id'] . "'");
|
mysql_query("DELETE from `adjacencies` WHERE `interface_id` = '" . $row['interface_id'] . "'");
|
||||||
mysql_query("DELETE from `links` WHERE `local_interface_id` = '" . $row['interface_id'] . "'");
|
mysql_query("DELETE from `links` WHERE `local_interface_id` = '" . $row['interface_id'] . "'");
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ if (!$auth)
|
|||||||
$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches;
|
$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches;
|
||||||
$woo = shell_exec($rrd_cmd);
|
$woo = shell_exec($rrd_cmd);
|
||||||
if ($debug) { echo("<pre>".$rrd_cmd."</pre>"); }
|
if ($debug) { echo("<pre>".$rrd_cmd."</pre>"); }
|
||||||
if (is_file($graphfile))
|
if (is_file($graphfile) && !$debug)
|
||||||
{
|
{
|
||||||
header('Content-type: image/png');
|
header('Content-type: image/png');
|
||||||
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
|
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
|
||||||
|
|||||||
Reference in New Issue
Block a user