This bug only relates to the PHP detection method, I was unable to get the browscap method working reliably.
I've noticed the module will identify any user agent containing "Windows" as a desktop browser, however mobile phones running Windows Phone 7.0/7.5 have User Agents that contain windows, information:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/intr...
I've added the following after the "windows" check as a quick and dirty proof of conecpt:
Line 147:
if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows phone os') > 0) {
$mobile_browser = 1;
}
Which correctly identifies windows phone7 as mobile.
It's not really efficient as it sets $mobile_browser to 0 and then back to 1, but it's just to show what need to be checked.
Comments
Comment #1
chrisfree commentedI can confirm that in limited testing this works. Again, not ideal, but if you're in a bind and need this immediately, it works. I was simply testing this with a basic UA switcher in Chrome.
Comment #2
chrisfree commentedHere is a patch that adds the code mentioned above, as well as cleans up a few code styling issues.
Comment #3
stanl3y commentedHello,
how can i implement ur patch?
Comment #4
pvmchau commentedI tried #2, but it doesn't work for me. I changed a little bit and it's working well.
Comment #5
pvmchau commented