summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2016-05-09 14:43:14 -0400
committerStephen Beaver <sbeaver@netgate.com>2016-05-09 14:44:22 -0400
commit6a5c6661960e1cd39e3caf66a3caaeb2678d27b1 (patch)
treee7f6333083c1072316b546470d48c2325bc46992 /src/usr/local/www/system.php
parent941ddb52531feed9f0764f211b4f15b2eecee810 (diff)
downloadpfsense-6a5c6661960e1cd39e3caf66a3caaeb2678d27b1.zip
pfsense-6a5c6661960e1cd39e3caf66a3caaeb2678d27b1.tar.gz
Add Compact-RED theme and update system.php to sort available themes by pfSense, then BETA, then user supplied themes.
Diffstat (limited to 'src/usr/local/www/system.php')
-rw-r--r--src/usr/local/www/system.php30
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";
OpenPOWER on IntegriCloud