forked from GNUsocial/gnu-social
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)
This commit is contained in:
parent
edea825c70
commit
3172b50fc7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user