From 7e669778016a5fb09ea6ba913cac7b19ab13c19b Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 2 Nov 2012 11:06:52 -0400 Subject: Make a function to get the current theme and use it everywhere rather than duplicating code or missing functions. (Fixes forced themes using the wrong theme for login screen) Conflicts: etc/inc/util.inc usr/local/www/head.inc --- usr/local/www/guiconfig.inc | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'usr/local/www/guiconfig.inc') diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 51cb475..1241fd2 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -62,23 +62,8 @@ foreach (scandir("/usr/local/www/classes/") as $file) { require_once("classes/{$file}"); } } -/* - * if user has selected a custom template, use it. - * otherwise default to pfsense template - */ -if($config['theme'] <> "") - $g['theme'] = $config['theme']; -else - $g['theme'] = "pfsense"; -/* - * If this device is an apple ipod/iphone - * switch the theme to one that works with it. - */ -$apple_ua = array("iPhone","iPod", "iPad"); -foreach($apple_ua as $useragent) - if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) - $g['theme'] = "pfsense"; +$g['theme'] = get_current_theme(); /* used by progress bar */ $lastseen = "-1"; -- cgit v1.1