From 9ad0b29da003b05d760452288fd5e70000d4337d Mon Sep 17 00:00:00 2001 From: dMetzger Date: Fri, 28 Sep 2012 15:09:10 +0000 Subject: [PATCH] // Browsers and OS updated git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17617 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Guest.php | 19 ++++++++------ install-dev/data/xml/operating_system.xml | 9 +++++++ install-dev/data/xml/web_browser.xml | 30 ++++++++++++++--------- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/classes/Guest.php b/classes/Guest.php index 1db077983..688cf95dd 100644 --- a/classes/Guest.php +++ b/classes/Guest.php @@ -102,14 +102,16 @@ class GuestCore extends ObjectModel protected function getBrowser($userAgent) { $browserArray = array( - 'Google Chrome' => 'Chrome/', + 'Chrome' => 'Chrome/', 'Safari' => 'Safari', - 'Firefox 3.x' => 'Firefox/3', - 'Firefox 2.x' => 'Firefox/2', + 'Safari iPad' => 'iPad', + 'Firefox' => 'Firefox/', 'Opera' => 'Opera', - 'IE 8.x' => 'MSIE 8', - 'IE 7.x' => 'MSIE 7', - 'IE 6.x' => 'MSIE 6' + 'IE 10' => 'MSIE 10', + 'IE 9' => 'MSIE 9', + 'IE 8' => 'MSIE 8', + 'IE 7' => 'MSIE 7', + 'IE 6' => 'MSIE 6' ); foreach ($browserArray as $k => $value) if (strstr($userAgent, $value)) @@ -127,9 +129,12 @@ class GuestCore extends ObjectModel protected function getOs($userAgent) { $osArray = array( - 'Windows Vista' => 'Windows NT 6', + 'Windows 8' => 'Windows NT 6.2', + 'Windows 7' => 'Windows NT 6.1', + 'Windows Vista' => 'Windows NT 6.0', 'Windows XP' => 'Windows NT 5', 'MacOsX' => 'Mac OS X', + 'Android' => 'Android', 'Linux' => 'X11' ); foreach ($osArray as $k => $value) diff --git a/install-dev/data/xml/operating_system.xml b/install-dev/data/xml/operating_system.xml index d77191e76..0844133ff 100644 --- a/install-dev/data/xml/operating_system.xml +++ b/install-dev/data/xml/operating_system.xml @@ -10,11 +10,20 @@ Windows Vista + + Windows 7 + + + Windows 8 + MacOsX Linux + + Android + diff --git a/install-dev/data/xml/web_browser.xml b/install-dev/data/xml/web_browser.xml index 4d31db30f..7bebdb311 100644 --- a/install-dev/data/xml/web_browser.xml +++ b/install-dev/data/xml/web_browser.xml @@ -7,26 +7,32 @@ Safari - - Firefox 2.x + + Safari iPad - - Firefox 3.x + + Firefox Opera - - IE 6.x + + IE 6 - - IE 7.x + + IE 7 - - IE 8.x + + IE 8 - - Google Chrome + + IE 9 + + + IE 10 + + + Chrome