diff --git a/html/includes/graphs/graph.inc.php b/html/includes/graphs/graph.inc.php index a5dfc51e7..511691fb5 100644 --- a/html/includes/graphs/graph.inc.php +++ b/html/includes/graphs/graph.inc.php @@ -64,10 +64,9 @@ if (is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.p } } } - if (!$auth) - { - include($config['install_dir'] . "/html/includes/graphs/$type/auth.inc.php"); - } + + include($config['install_dir'] . "/html/includes/graphs/$type/auth.inc.php"); + if ($auth) { include($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php"); @@ -117,7 +116,8 @@ if (!$auth) $rrd_cmd = $config['rrdtool'] . " graph $graphfile $rrd_options" . $rrd_switches; $woo = shell_exec($rrd_cmd); if ($_GET['debug']) { echo("
".$rrd_cmd.""); } - if (is_file($graphfile)) { + if (is_file($graphfile)) + { header('Content-type: image/png'); $fd = fopen($graphfile,'r');fpassthru($fd);fclose($fd); unlink($graphfile); diff --git a/html/includes/graphs/sensor/auth.inc.php b/html/includes/graphs/sensor/auth.inc.php index dd00f4e7b..5d4de6631 100644 --- a/html/includes/graphs/sensor/auth.inc.php +++ b/html/includes/graphs/sensor/auth.inc.php @@ -17,7 +17,4 @@ if(is_numeric($id)) } } - - - ?>