silverstripe-archive / silverstripe-mobile

Mobile support module for SilverStripe CMS
http://silverstripe.org/mobile/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

MobileBrowserDetection::is_windows doesn't detect my emulators #16

Open sminnee opened 12 years ago

sminnee commented 12 years ago

From http://open.silverstripe.org/ticket/6005

I had to add "windows phone" to agent detection

public static function is_windows() {
    return (preg_match('/(windows ce; ppc;|windows ce; smartphone;|windows ce; iemobile|windows phone)/i', $_SERVER['HTTP_USER_AGENT'])) ? true : false;
}