mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove all unneeded if($debug)-statements and replace them with d_echo . html dir..
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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']);
|
||||
|
Reference in New Issue
Block a user