Fix rrd_name escaping * used with glob()

Thanks tuxis-ie for finding the issue and fix.
This commit is contained in:
Tony Murray
2016-08-12 14:42:57 -05:00
parent 8eced98439
commit 5db9256baf
8 changed files with 11 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ $colour_area_in = 'CDEB8B';
$colour_area_out = 'C3D9FF';
$rrd_list = array();
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], '*')));
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id']), '*.rrd'));
foreach ($rrd_filenames as $file) {
$pieces = explode('-', basename($file, '.rrd'));
$hostname = end($pieces);

View File

@@ -8,7 +8,7 @@ $total_text = 'Total of all ShoutCast Servers';
$nototal = 0;
$rrd_list = array();
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id'], '*')));
$rrd_filenames = glob(rrd_name($device['hostname'], array('app', 'shoutcast', $app['app_id']), '*.rrd'));
foreach ($rrd_filenames as $file) {
$pieces = explode('-', basename($file, '.rrd'));
$hostname = end($pieces);