diff options
author | jim-p <jimp@pfsense.org> | 2010-10-19 15:34:35 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-10-19 15:34:35 -0400 |
commit | d7381e715d716a26f4a139edfaa2cb2f63d0ba5e (patch) | |
tree | b88ada0fed903c60235b3b538f46c2aaf8890ca9 | |
parent | f2a86ca96fb8e49d978679dab4cfad6ce2f0d9f4 (diff) | |
download | pfsense-d7381e715d716a26f4a139edfaa2cb2f63d0ba5e.zip pfsense-d7381e715d716a26f4a139edfaa2cb2f63d0ba5e.tar.gz |
Generalize the "low res" user agent detection so it isn't Apple-specific. Include Android in the detection, and also provide a mechanism so that the "low res" theme can be set in globals.inc.
-rwxr-xr-x | usr/local/www/head.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc index 12f38b8..e4a7a95 100755 --- a/usr/local/www/head.inc +++ b/usr/local/www/head.inc @@ -16,10 +16,10 @@ else * 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) +$lowres_ua = array("iPhone","iPod", "iPad", "Android"); +foreach($lowres_ua as $useragent) if(strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) - $g['theme'] = "pfsense"; + $g['theme'] = empty($g['theme_lowres']) ? "pfsense" : $g['theme_lowres']; $pagetitle = gentitle( $pgtitle ); |