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
path: root/libs
diff options
context:
space:
mode:
authorsgiehl <stefan@piwik.org>2014-05-24 20:37:04 +0400
committersgiehl <stefan@piwik.org>2014-05-24 20:37:04 +0400
commitcef2d69f76320d8f02cea2418a4bf5d506aee513 (patch)
treec3a362a861346fc4fb32be6f1864b8cc9f27b3ce /libs
parentcbde69956082195aa04439deb269181f5fdd8759 (diff)
starting to implement new DeviceDetector structure
Diffstat (limited to 'libs')
-rw-r--r--libs/UserAgentParser/UserAgentParser.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/UserAgentParser/UserAgentParser.php b/libs/UserAgentParser/UserAgentParser.php
index a57554e4da..4f85951c93 100644
--- a/libs/UserAgentParser/UserAgentParser.php
+++ b/libs/UserAgentParser/UserAgentParser.php
@@ -655,9 +655,9 @@ class UserAgentParser
if (isset(self::$browserIdToName[$browserId])) {
return self::$browserIdToName[$browserId];
}
- if(class_exists('DeviceDetector')) {
- if( !empty(DeviceDetector::$browsers[$browserId])) {
- return DeviceDetector::$browsers[$browserId];
+ if(class_exists('DeviceDetector\\Parser\\Client\\Browser')) {
+ if( array_key_exists($browserId, DeviceDetector\Parser\Client\Browser::getAvailableBrowsers())) {
+ return DeviceDetector\Parser\Client\Browser::getAvailableBrowsers()[$browserId];
}
}
return false;
@@ -692,8 +692,8 @@ class UserAgentParser
return self::$operatingSystemsIdToName[$osId];
}
- if(class_exists('DeviceDetector')) {
- return DeviceDetector::getOsNameFromId($osId);
+ if(class_exists('DeviceDetector\\Parser\\OperatingSystem')) {
+ return DeviceDetector\Parser\OperatingSystem::getNameFromId($osId);
}
return false;
}