diff --git a/src/www/status_rrd_graph.php b/src/www/status_rrd_graph.php
index c0eb15749..3406f2f2b 100644
--- a/src/www/status_rrd_graph.php
+++ b/src/www/status_rrd_graph.php
@@ -526,7 +526,7 @@ function get_dates($curperiod, $graph) {
echo "
\n";
echo " \n";
+ echo "src=\"status_rrd_graph_img.php?start={$start}&end={$end}&database={$curdatabase}&style={$curstyle}&graph={$graph}-{$img_date}\" />\n";
echo "
\n";
echo " |
\n";
}
@@ -595,7 +595,7 @@ function get_dates($curperiod, $graph) {
echo "\n";
echo " \n";
+ echo "src=\"status_rrd_graph_img.php?start={$start}&end={$end}&database={$curdatabase}&style={$curstyle}&graph={$graph}-{$img_date}\" />\n";
echo "
\n";
echo " |
\n";
}
diff --git a/src/www/status_rrd_graph_img.php b/src/www/status_rrd_graph_img.php
index 12de2ee2f..1fef5476f 100644
--- a/src/www/status_rrd_graph_img.php
+++ b/src/www/status_rrd_graph_img.php
@@ -1217,18 +1217,20 @@ else {
/* check modification time to see if we need to generate image */
if (file_exists("$rrdtmppath$curdatabase-$curgraph.png")) {
if((time() - filemtime("$rrdtmppath$curdatabase-$curgraph.png")) >= 15 ) {
- if($data)
+ if ($data) {
$_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn);
$graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd;
flush();
usleep(500);
+ }
}
} else {
- if($data)
+ if ($data) {
$_gb = exec("$graphcmd 2>&1", $graphcmdoutput, $graphcmdreturn);
$graphcmdoutput = implode(" ", $graphcmdoutput) . $graphcmd;
flush();
usleep(500);
+ }
}
if(($graphcmdreturn <> 0) || (! $data)) {
log_error(sprintf(gettext('Failed to create graph with error code %1$s, the error is: %2$s'),$graphcmdreturn,$graphcmdoutput));