Skip to content

Commit

Permalink
fixes #5246 - added detection for Zopo devices
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Jul 29, 2014
1 parent d636108 commit c881d35
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
1 change: 1 addition & 0 deletions Parser/Device/DeviceParserAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ abstract class DeviceParserAbstract extends ParserAbstract
'XX' => 'Unknown',
'YU' => 'Yuandao',
'ZO' => 'Zonda',
'ZP' => 'Zopo',
'ZT' => 'ZTE',
);

Expand Down
70 changes: 69 additions & 1 deletion Tests/fixtures/smartphone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20858,7 +20858,75 @@
model: MI-ONE Plus
os_family: Android
browser_family: Android Browser
-
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.4; ar-eg; ZP200+ Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.0.4
client:
type: browser
name: Android Browser
short_name: AN
version:
device:
type: smartphone
brand: ZP
model: ZP200+
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; Android 4.2.2; ZOPO_ZP980 Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.114 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.2.2
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 34.0.1847.114
device:
type: smartphone
brand: ZP
model: ZP980
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.1; fr-fr; ZP950H Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2.1
client:
type: browser
name: Android Browser
short_name: AN
version:
device:
type: smartphone
brand: ZP
model: ZP950H
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.2.2; he-il; ZP1000 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Android
short_name: AND
version: 4.2.2
client:
type: browser
name: Android Browser
short_name: AN
version:
device:
type: smartphone
brand: ZP
model: ZP1000
os_family: Android
browser_family: Android Browser
-
user_agent: Mozilla/5.0 (Linux; U; Android 2.2.2; fr-fr; ZTE-BLADE Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
os:
name: Android
Expand Down
6 changes: 6 additions & 0 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,12 @@ Web TV:
device: 'tv'
model: ''

# Zopo
Zopo:
regex: '(?:ZOPO[_ ])?(ZP[0-9]{2,}[^/;]+) Build'
device: 'smartphone'
model: '$1'

# ZTE
ZTE:
regex: 'ZTE|Z331'
Expand Down

0 comments on commit c881d35

Please sign in to comment.