From c040eeda3a9710869caf276a564207866497ee67 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 20 Nov 2015 13:09:31 +0545 Subject: If webguicss is not yet specified then default to pfSense On systems where webguicss (the theme) was not yet set in the config, the selection here was defaulting to other than pfSense. Now that pfSense-dark has come along, it happened to be first in the list. When I changed something else in General Setup today, my them went to pfSense-dark because I did not notice the (accidentally) selected value that was in the field. I also added a check for if the current webguicss is not a valid one - e.g. if a theme is selected in the config that is no longer on the system. That should help future-proof it so it will default back to pfSense.css in that case also. --- src/usr/local/www/system.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php index 1f83b4a..4617bd6 100644 --- a/src/usr/local/www/system.php +++ b/src/usr/local/www/system.php @@ -467,6 +467,10 @@ foreach ($css as $file) { } } +if (($pconfig['webguicss'] == "") || (!isset($csslist[$pconfig['webguicss']]))) { + $pconfig['webguicss'] = "pfSense.css"; +} + $section = new Form_Section('Web configurator theme'); $section->addInput(new Form_Select( -- cgit v1.1