Fixed some scrut major issues

This commit is contained in:
Neil Lathwood
2015-02-22 19:28:09 +00:00
parent 2e7887f115
commit cd43e11032
6 changed files with 58 additions and 50 deletions

View File

@@ -86,7 +86,7 @@ function graph_error($string)
rrdtool_graph($graphfile, $rrd_options);
if ($height > "99") {
$woo = shell_exec($rrd_cmd);
shell_exec($rrd_cmd);
if ($debug) { echo("<pre>".$rrd_cmd."</pre>"); }
if (is_file($graphfile) && !$debug)
{
@@ -98,7 +98,6 @@ function graph_error($string)
} else {
if (!$debug) { header('Content-type: image/png'); }
$im = imagecreate($width, $height);
$orange = imagecolorallocate($im, 255, 225, 225);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, $height / 2 - 8, $string, imagecolorallocate($im, 128, 0, 0));
imagepng($im);
@@ -113,7 +112,7 @@ if ($error_msg) {
graph_error($graph_error);
} elseif (!$auth) {
} elseif ($auth === null) {
// We are unauthenticated :(
if ($width < 200)