Fix scrut issues, pass by reference

This commit is contained in:
Tony Murray
2016-07-07 21:57:18 -05:00
parent a1ab19047e
commit c18c01c83f
3 changed files with 6 additions and 3 deletions

View File

@@ -10,7 +10,8 @@ $nototal = 0;
$rrd_list = array();
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], '*')));
foreach ($rrd_filenames as $file) {
$hostname = end(explode('-',basename($file, '.rrd')));
$pieces = explode('-', basename($file, '.rrd'));
$hostname = end($pieces);
list($host, $port) = explode('_', $hostname, 2);
$rrd_list[] = array(
'filename' => $file,