summaryrefslogtreecommitdiffstats
path: root/usr/local/www/head.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-04-22 11:22:26 -0400
committerjim-p <jimp@pfsense.org>2011-04-22 11:23:43 -0400
commitd8da6350bc7d642c92e121aca469f36c61875194 (patch)
tree130bced1ead6b5115f87d68ee65fbe66be425fda /usr/local/www/head.inc
parentde7222fbf0c65ddb8c1a1dc3658381274698e56e (diff)
downloadpfsense-d8da6350bc7d642c92e121aca469f36c61875194.zip
pfsense-d8da6350bc7d642c92e121aca469f36c61875194.tar.gz
Provide a method for rebrands to force a theme. Otherwise upgrading nanobsd from pfSense to a rebrand image without the theme in the config.xml will have a broken GUI since the theme isn't there.
Diffstat (limited to 'usr/local/www/head.inc')
-rwxr-xr-xusr/local/www/head.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index a24be9e..b76374b 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -7,7 +7,9 @@
* if user has selected a custom template, use it.
* otherwise default to pfsense tempalte
*/
-if($config['theme'] <> "" && (is_dir($g["www_path"].'/themes/'.$config['theme'])))
+if (($g["disablethemeselection"] === true) && !empty($g["default_theme"]) && (is_dir($g["www_path"].'/themes/'.$g["default_theme"])))
+ $g['theme'] = $g["default_theme"];
+elseif($config['theme'] <> "" && (is_dir($g["www_path"].'/themes/'.$config['theme'])))
$g['theme'] = $config['theme'];
else
$g['theme'] = "pfsense";
OpenPOWER on IntegriCloud