diff options
author | jim-p <jimp@pfsense.org> | 2011-04-22 11:22:26 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-04-22 11:23:43 -0400 |
commit | d8da6350bc7d642c92e121aca469f36c61875194 (patch) | |
tree | 130bced1ead6b5115f87d68ee65fbe66be425fda /usr/local/www/head.inc | |
parent | de7222fbf0c65ddb8c1a1dc3658381274698e56e (diff) | |
download | pfsense-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-x | usr/local/www/head.inc | 4 |
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"; |