Alphabetize the apps list

This commit is contained in:
Tony Murray
2016-06-03 21:04:56 -05:00
parent 2ebdb3c083
commit a68687de5e

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