We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 3172b50f authored by Brion Vibber's avatar Brion Vibber

Add a User-Agent fragment blacklist to MobileProfile: sticking iPad on the...

Add a User-Agent fragment blacklist to MobileProfile: sticking iPad on the regular theme, which works better on its larger screen (was tripped on 'mobile' in the UA though we had no explicit check for 'ipad' previously)
parent edea825c
......@@ -141,8 +141,19 @@ class MobileProfilePlugin extends WAP20Plugin
'windows ce'
);
$blacklist = array(
'ipad', // Larger screen handles the full theme fairly well.
);
$httpuseragent = strtolower($_SERVER['HTTP_USER_AGENT']);
foreach ($blacklist as $md) {
if (strstr($httpuseragent, $md) !== false) {
$this->serveMobile = false;
return true;
}
}
foreach ($this->mobiledevices as $md) {
if (strstr($httpuseragent, $md) !== false) {
$this->setMobileFeatures($httpuseragent);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment