Update to mobile phone detection
scottgifford - July 25, 2008 - 16:34
| Project: | Mobile theme selection |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This patch updates mobile phone detection to detect the iPhone and the iPod touch. It also removes checking for PPC, since this detects PowerPC Macs, and one of the other strings should match on a PocketPC.
diff -u --exclude '*~' --exclude '*#' --new-file -r ../orig-modules/mobit/mobit.module mobit/mobit.module
--- ../orig-modules/mobit/mobit.module 2007-03-13 01:47:35.000000000 +0000
+++ mobit/mobit.module 2008-07-17 06:01:34.000000000 +0000
@@ -25,9 +25,11 @@
}
// Check if it is a moblizable client (make sure any updates here go to mobilize.php as well)
if (strpos($acpt,'wml') || strpos($uAgt,'PDXGW') || strpos($uAgt,'portalmmm') ||
- strpos($uAgt,'DoCoMo') || strpos($uAgt,'Windows CE') || strpos($uAgt,'PPC') ||
+ strpos($uAgt,'DoCoMo') || strpos($uAgt,'Windows CE') || strpos($uAgt,'IEMobile') ||
strpos($uAgt,'Palm') || strpos($uAgt,'BlackBerry') || strpos($uAgt,'Symbian') ||
- strpos($uAgt,'dopod')) {
+ strpos($uAgt,'dopod') || strpos($uAgt,'iPhone') || strpos($uAgt,'iPod') ||
+ strpos($uAgt,'Mobile')
+ ) {
return true;
}
else
#1
Project is abandoned and marking its issues as fixed. Anyone using or interested in this might want to investigate using Mobile Tools.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.