# As the base rrdtool command and subcommand is handled and built # outside the function now, only the arguments for the respective # rrtool subcommand needs to be generated and returned in the graph # functions. --- a/html/includes/collectd/functions.php +++ b/html/includes/collectd/functions.php @@ -750,11 +750,10 @@ } } - $rrdcmd = RRDTOOL; - $rrdcmd = ""; + $rrdargs = ""; for ($i = 1; $i < count($cmd); $i++) - $rrdcmd .= ' '.escapeshellarg($cmd[$i]); - return $rrdcmd; + $rrdargs .= ' '.escapeshellarg($cmd[$i]); + return $rrdargs; } /** @@ -784,7 +783,6 @@ # $cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height'], '-t', $opts['title']); # $cmd = array_merge($cmd, $config['rrd_opts_array'], $opts['rrd_opts']); - $cmd = array(RRDTOOL, 'graph', '-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']); $cmd = array('-', '-E', '-a', 'PNG', '-w', $config['rrd_width'], '-h', $config['rrd_height']); if($config['rrd_width'] <= "300") { @@ -833,10 +831,10 @@ } } - $rrdcmd = RRDTOOL; + $rrdargs = ""; for ($i = 1; $i < count($cmd); $i++) - $rrdcmd .= ' '.escapeshellarg($cmd[$i]); - return $rrdcmd; + $rrdargs .= ' '.escapeshellarg($cmd[$i]); + return $rrdargs; } ?>