Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2014-02-19 12:38:09 +0400
committersgiehl <stefan@piwik.org>2014-02-19 14:54:37 +0400
commit7d64d97ed2cf13b142fb093a7b29989ecb11cda6 (patch)
tree1f5a6f45075d6eb4dfc3d6b3c23697982ee8fc0f
parentf98cc5080aae0f43356944c20cf9b54ea659b1cd (diff)
added detection for RISC OS and it's Oregano browser
-rw-r--r--plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php3
-rw-r--r--plugins/DevicesDetection/UserAgentParserEnhanced/regexes/browsers.yml7
-rw-r--r--plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml10
-rw-r--r--plugins/UserSettings/images/browsers/OR.gifbin0 -> 1024 bytes
-rw-r--r--plugins/UserSettings/images/os/ROS.gifbin0 -> 956 bytes
-rw-r--r--tests/PHPUnit/Fixtures/userAgentParserEnhancedFixtures.yml100
6 files changed, 115 insertions, 5 deletions
diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php
index ceb938a095..636efb82ea 100644
--- a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php
+++ b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php
@@ -220,6 +220,7 @@ class UserAgentParserEnhanced
'Presto' => 'PRS',
'Puppy' => 'PPY',
'Red Hat' => 'RHT',
+ 'RISC OS' => 'ROS',
'SUSE' => 'SSE',
'Sailfish OS' => 'SAF',
'Slackware' => 'SLW',
@@ -273,6 +274,7 @@ class UserAgentParserEnhanced
'Google TV' => array('GTV'),
'IBM' => array('OS2'),
'iOS' => array('IOS'),
+ 'RISC OS' => array('ROS'),
'Linux' => array('LIN', 'ARL', 'DEB', 'KNO', 'MIN', 'UBT', 'KBT', 'XBT', 'LBT', 'FED', 'RHT', 'MDR', 'GNT', 'SLW', 'SSE', 'PPY', 'CES', 'BTR', 'YNS', 'PRS', 'SAF'),
'Mac' => array('MAC'),
'Mobile Gaming Console' => array('PSP', 'NDS', 'XBX'),
@@ -374,6 +376,7 @@ class UserAgentParserEnhanced
'OM' => 'Opera Mobile',
'OP' => 'Opera',
'ON' => 'Opera Next',
+ 'OR' => 'Oregano',
'OV' => 'Openwave Mobile Browser',
'OW' => 'OmniWeb',
'PL' => 'Palm Blazer',
diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/browsers.yml b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/browsers.yml
index 86dcbb8d4e..506b2c1ec8 100644
--- a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/browsers.yml
+++ b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/browsers.yml
@@ -485,7 +485,12 @@
- regex: 'Obigo|Teleca'
name: 'Obigo'
version: ''
-
+
+#Oregano
+- regex: 'Oregano(?:[ /](\d+\.\d+))?'
+ name: 'Oregano'
+ version: '$1'
+
#Polaris
- regex: '(?:Polaris|Embider)(?:/(\d+\.\d+))?'
name: 'Polaris'
diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml
index 346eae7ce4..d4c63aca9e 100644
--- a/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml
+++ b/plugins/DevicesDetection/UserAgentParserEnhanced/regexes/oss.yml
@@ -323,8 +323,14 @@
- regex: '(?:Mobile|Tablet);.+Firefox/\d+\.\d+'
name: 'Firefox OS'
version: ''
-
-
+
+
+##########
+# RISC OS
+##########
+- regex: 'RISC OS(?:[ /](\d+\.\d+))?'
+ name: 'RISC OS'
+ version: '$1'
##########
# Bada
diff --git a/plugins/UserSettings/images/browsers/OR.gif b/plugins/UserSettings/images/browsers/OR.gif
new file mode 100644
index 0000000000..5b18e64798
--- /dev/null
+++ b/plugins/UserSettings/images/browsers/OR.gif
Binary files differ
diff --git a/plugins/UserSettings/images/os/ROS.gif b/plugins/UserSettings/images/os/ROS.gif
new file mode 100644
index 0000000000..a445b66182
--- /dev/null
+++ b/plugins/UserSettings/images/os/ROS.gif
Binary files differ
diff --git a/tests/PHPUnit/Fixtures/userAgentParserEnhancedFixtures.yml b/tests/PHPUnit/Fixtures/userAgentParserEnhancedFixtures.yml
index 99abee8617..865b2e26d5 100644
--- a/tests/PHPUnit/Fixtures/userAgentParserEnhancedFixtures.yml
+++ b/tests/PHPUnit/Fixtures/userAgentParserEnhancedFixtures.yml
@@ -17328,7 +17328,7 @@
os_family: Android
browser_family: Opera
-
- user_agent: Mozilla/5.0 (X11; U; Linux x86_64; fa-ir) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.10977AP
+ user_agent: 'Mozilla/5.0 (X11; U; Linux x86_64; fa-ir) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.10977AP'
os:
name: Linux
short_name: LIN
@@ -17342,4 +17342,100 @@
brand:
model:
os_family: Linux
- browser_family: \ No newline at end of file
+ browser_family: Unknown
+-
+ user_agent: 'Mozilla/5.0 (Linux; U; Android 4.0.4; fa-ir) AppleWebKit/534.35 (KHTML, like Gecko) Chrome/11.0.696.65 Safari/534.35 Puffin/2.10990AP Mobile'
+ os:
+ name: Android
+ short_name: AND
+ version: 4.0
+ browser:
+ name: Puffin
+ short_name: PU
+ version: 2.10990
+ device:
+ type:
+ brand:
+ model:
+ os_family: Android
+ browser_family: Unknown
+-
+ user_agent: Mozilla 5.0 (Linux; U; Android 2.3.5; zh-cn; ZTE U793 Build MocorDroid2.3.5) UC AppleWebKit 534.31 (KHTML, like Gecko) Mobile Safari 534.31
+ os:
+ name: Android
+ short_name: AND
+ version: 2.3
+ browser:
+ name: Android Browser
+ short_name: AN
+ version:
+ device:
+ type: smartphone
+ brand: ZT
+ model: U793
+ os_family: Android
+ browser_family: Android Browser
+-
+ user_agent: Mozilla 5.0 (Linux; U; Android 2.3.6; zh-cn; ZTE U790 Build GRK39F) UC AppleWebKit 534.31 (KHTML, like Gecko) Mobile Safari 534.31
+ os:
+ name: Android
+ short_name: AND
+ version: 2.3
+ browser:
+ name: Android Browser
+ short_name: AN
+ version:
+ device:
+ type: smartphone
+ brand: ZT
+ model: U790
+ os_family: Android
+ browser_family: Android Browser
+-
+ user_agent: Mozilla 5.0 (Linux; U; Android 4.1.2; en-us; HUAWEI G610-C00 Build HuaweiG610-C00) UC AppleWebKit 534.31 (KHTML, like Gecko) Mobile Safari 534.31
+ os:
+ name: Android
+ short_name: AND
+ version: 4.1
+ browser:
+ name: Android Browser
+ short_name: AN
+ version:
+ device:
+ type: smartphone
+ brand: HU
+ model: G610
+ os_family: Android
+ browser_family: Android Browser
+-
+ user_agent: Mozilla 5.0 (Linux; U; Android 4.1.2; zh-cn; SCH-I829 Build JZO54K) UC AppleWebKit 534.31 (KHTML, like Gecko) Mobile Safari 534.31
+ os:
+ name: Android
+ short_name: AND
+ version: 4.1
+ browser:
+ name: Android Browser
+ short_name: AN
+ version:
+ device:
+ type: smartphone
+ brand: SA
+ model: SCH-I829
+ os_family: Android
+ browser_family: Android Browser
+-
+ user_agent: 'Mozilla/1.10 [en] (Compatible; RISC OS 3.70; Oregano 1.10)'
+ os:
+ name: RISC OS
+ short_name: ROS
+ version: 3.70
+ browser:
+ name: Oregano
+ short_name: OR
+ version: 1.10
+ device:
+ type:
+ brand:
+ model:
+ os_family: RISC OS
+ browser_family: Unknown \ No newline at end of file