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:
Tom Laermans
2011-03-18 11:27:52 +00:00
parent bc9e030ec3
commit 5d1e5f9592
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ if (!$auth)
$rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches;
$woo = shell_exec($rrd_cmd);
if ($debug) { echo("<pre>".$rrd_cmd."</pre>"); }
if (is_file($graphfile))
if (is_file($graphfile) && !$debug)
{
header('Content-type: image/png');
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);