Remove some deprecated functions

This commit is contained in:
Tony Murray
2016-04-24 01:05:14 -05:00
parent 413d0b7c5e
commit b98ba8c1a4
7 changed files with 14 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ $i = 0;
if ($handle = opendir($rrddir)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
if (eregi('app-shoutcast-'.$app['app_id'], $file)) {
if (stripos($file, 'app-shoutcast-'.$app['app_id'])) {
array_push($files, $file);
}
}
@@ -35,8 +35,8 @@ if ($handle = opendir($rrddir)) {
}
foreach ($files as $id => $file) {
$hostname = eregi_replace('app-shoutcast-'.$app['app_id'].'-', '', $file);
$hostname = eregi_replace('.rrd', '', $hostname);
$hostname = str_ireplace('app-shoutcast-'.$app['app_id'].'-', '', $file);
$hostname = str_ireplace('.rrd', '', $hostname);
list($host, $port) = explode('_', $hostname, 2);
$rrd_filenames[] = $rrddir.'/'.$file;
$rrd_list[$i]['filename'] = $rrddir.'/'.$file;

View File

@@ -15,7 +15,7 @@ $x = 0;
if ($handle = opendir($rrddir)) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..') {
if (eregi('app-shoutcast-'.$app['app_id'], $file)) {
if (stripos($file, 'app-shoutcast-'.$app['app_id'])) {
array_push($files, $file);
}
}
@@ -23,8 +23,8 @@ if ($handle = opendir($rrddir)) {
}
foreach ($files as $id => $file) {
$hostname = eregi_replace('app-shoutcast-'.$app['app_id'].'-', '', $file);
$hostname = eregi_replace('.rrd', '', $hostname);
$hostname = str_ireplace('app-shoutcast-'.$app['app_id'].'-', '', $file);
$hostname = str_ireplace('.rrd', '', $hostname);
list($host, $port) = explode('_', $hostname, 2);
$rrd_filenames[] = $rrddir.'/'.$file;
$rrd_list[$i]['filename'] = $rrddir.'/'.$file;