diff options
Diffstat (limited to 'src/usr/local/www/system.php')
-rw-r--r-- | src/usr/local/www/system.php | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php index da791dc..2795c6c 100644 --- a/src/usr/local/www/system.php +++ b/src/usr/local/www/system.php @@ -490,13 +490,31 @@ $section->addInput(new Form_Select( $form->add($section); $csslist = array(); -$css = glob("/usr/local/www/css/*.css"); -foreach ($css as $file) { - $file = basename($file); - $csslist[$file] = pathinfo($file, PATHINFO_FILENAME); -} -asort($csslist); +// List pfSense files, then any BETA files followed by any user-contributed files +$cssfiles = glob("/usr/local/www/css/*.css"); + +if(is_array($cssfiles)) { + arsort($cssfiles); + $usrcss = $pfscss = $betacss = array(); + + foreach ($cssfiles as $css) { + if (strpos($css, "BETA") != 0) { + array_push($betacss, $css); + } else if (strpos($css, "pfSense") != 0) { + array_push($pfscss, $css); + } else { + array_push($usrcss, $css); + } + } + + $css = array_merge($pfscss, $betacss, $usrcss); + + foreach ($css as $file) { + $file = basename($file); + $csslist[$file] = pathinfo($file, PATHINFO_FILENAME); + } +} if (!isset($pconfig['webguicss']) || !isset($csslist[$pconfig['webguicss']])) { $pconfig['webguicss'] = "pfSense.css"; |