diff options
author | Sarven Capadisli <csarven@status.net> | 2009-10-03 20:17:26 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2009-10-03 20:17:26 +0000 |
commit | 604cfd8b116886cac04a8d062c66f11fb601318f (patch) | |
tree | d5e537f09d19754af7e5b44c233a9c9ad2046e91 /plugins/MobileProfile | |
parent | 36744771da42e0c4a6e735642601e21bc551dc4b (diff) |
Updated comment about browser sniffing
Diffstat (limited to 'plugins/MobileProfile')
-rw-r--r-- | plugins/MobileProfile/MobileProfilePlugin.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index cce8f8081..f594f3c0e 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -96,8 +96,16 @@ class MobileProfilePlugin extends WAP20Plugin // serve them MP // XXX: Browser sniffing sucks + // I really don't like going through this every page, // find a better way + + // May be better to categorize the devices in terms of + // low,mid,high-end + + // Or, detect the mobile devices based on their support for + // MP 1.0, 1.1, or 1.2 may be ideal. Possible? + $this->mobiledevices = array('alcatel', 'android', 'audiovox', 'au-mic,', 'avantgo', 'blackberry', 'blazer', 'cldc-', 'danger', @@ -112,8 +120,8 @@ class MobileProfilePlugin extends WAP20Plugin $httpuseragent = strtolower($_SERVER['HTTP_USER_AGENT']); - foreach($this->mobiledevices as $mb) { - if (strstr($httpuseragent, $mb) !== false) { + foreach($this->mobiledevices as $md) { + if (strstr($httpuseragent, $md) !== false) { $this->serveMobile = true; break; } |