Merge pull request #3600 from murrant/rrdcached

Alphabetize the apps list
This commit is contained in:
Neil Lathwood
2016-06-04 07:28:01 +01:00

View File

@@ -2,14 +2,10 @@
<?php
// Load our list of available applications
if ($handle = opendir($config['install_dir'].'/includes/polling/applications/')) {
while (false !== ($file = readdir($handle))) {
if ($file != '.' && $file != '..' && strstr($file, '.inc.php')) {
$applications[] = str_replace('.inc.php', '', $file);
}
foreach (scandir($config['install_dir'].'/includes/polling/applications/') as $file) {
if (substr($file, -8) == '.inc.php') {
$applications[] = substr($file, 0, -8);
}
closedir($handle);
}
// Check if the form was POSTed