dont show commands that arent being run in non-debug when doing graph debug

git-svn-id: http://www.observium.org/svn/observer/trunk@2521 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-09-20 15:39:24 +00:00
parent 9a1bee1458
commit 971dcf205a

View File

@@ -144,11 +144,14 @@ if ($error_msg) {
if ($config['rrdcached']) { $rrd_switches = " --daemon ".$config['rrdcached'] . " "; }
rrdtool_graph($graphfile, " $rrd_options");
if ($debug) { echo("<pre>".$rrd_cmd."</pre>"); }
if (is_file($graphfile) && !$debug)
if (is_file($graphfile))
{
header('Content-type: image/png');
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
unlink($graphfile);
if (!$debug)
{
header('Content-type: image/png');
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
unlink($graphfile);
}
}
else
{