]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Updated comment about browser sniffing
authorSarven Capadisli <csarven@status.net>
Sat, 3 Oct 2009 20:17:26 +0000 (20:17 +0000)
committerSarven Capadisli <csarven@status.net>
Sat, 3 Oct 2009 20:17:26 +0000 (20:17 +0000)
plugins/MobileProfile/MobileProfilePlugin.php

index cce8f8081c766dd21c76db2a95cb3d761021e9b4..f594f3c0ee841a842893b9484b21f5fc972064a0 100644 (file)
@@ -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;
                     }