one less fork per graph on a page, yay

git-svn-id: http://www.observium.org/svn/observer/trunk@768 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-05 23:11:47 +00:00
parent a0da062bdb
commit fb9c1f270d

View File

@ -61,7 +61,7 @@ if($_GET['debug']) {
$thing = shell_exec($config['rrdtool'] . " graph $graphfile $rrd_options");
if(is_file($graphfile)) {
header('Content-type: image/png');
echo(`cat $graphfile`);
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
} else {
header('Content-type: image/png');
$string = "Graph Generation Error";
@ -76,7 +76,7 @@ if($_GET['debug']) {
if($graph) {
header('Content-type: image/png');
echo(`cat $graphfile`);
$fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd);
} else {
header('Content-type: image/png');
$string = "Graph Generation Error";