Remove all unneeded if($debug)-statements and replace them with d_echo . html dir..

This commit is contained in:
Mark Schouten
2015-08-20 15:07:28 +02:00
parent 55a2e0423d
commit 4fa88bb928
8 changed files with 11 additions and 32 deletions

View File

@@ -69,9 +69,7 @@ function graph_error($string) {
if ($height > '99') {
shell_exec($rrd_cmd);
if ($debug) {
echo '<pre>'.$rrd_cmd.'</pre>';
}
d_echo('<pre>'.$rrd_cmd.'</pre>');
if (is_file($graphfile) && !$debug) {
header('Content-type: image/png');
@@ -135,9 +133,7 @@ else {
else {
if ($rrd_options) {
rrdtool_graph($graphfile, $rrd_options);
if ($debug) {
echo $rrd_cmd;
}
d_echo($rrd_cmd);
if (is_file($graphfile)) {
if (!$debug) {

View File

@@ -11,14 +11,10 @@ if (is_numeric($vars['id'])) {
if (is_array($acc)) {
if ($auth || port_permitted($acc['port_id'])) {
if ($debug) {
echo $config['rrd_dir'].'/'.$acc['hostname'].'/'.safename('cip-'.$acc['ifIndex'].'-'.$acc['mac'].'.rrd');
}
d_echo($config['rrd_dir'].'/'.$acc['hostname'].'/'.safename('cip-'.$acc['ifIndex'].'-'.$acc['mac'].'.rrd'));
if (is_file($config['rrd_dir'].'/'.$acc['hostname'].'/'.safename('cip-'.$acc['ifIndex'].'-'.$acc['mac'].'.rrd'))) {
if ($debug) {
echo 'exists';
}
d_echo('exists');
$rrd_filename = $config['rrd_dir'].'/'.$acc['hostname'].'/'.safename('cip-'.$acc['ifIndex'].'-'.$acc['mac'].'.rrd');
$port = get_port_by_id($acc['port_id']);