From 58c88c1b2980ee1c02a47cb3d35de1480402e6ac Mon Sep 17 00:00:00 2001 From: mattab Date: Fri, 24 May 2013 23:23:17 +1200 Subject: Refs #3612 * making tests pass! * enabling DevicesDetection tests, even though DevicesDetection plugin is disabled by default. --- plugins/DevicesDetection/functions.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/DevicesDetection/functions.php') diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index 34f8ed8690..0812741aec 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -130,18 +130,16 @@ function Piwik_getOsFullNameExtended($label) if (!empty($label) && $label != ";") { $os = substr($label, 0, 3); $ver = substr($label, 4, 15); - $osFullName = array_search($os, UserAgentParserEnhanced::$osShorts); - if ($osFullName) { - if (in_array($os, UserAgentParserEnhanced::$osFamilies['Windows'])) { - return $osFullName; - } else { - return trim($osFullName . " " . $ver); - } + $name = UserAgentParserEnhanced::getOsNameFromId($os, $ver); + if(!empty($name)) { + return $name; } } return Piwik_Translate('General_Unknown'); } + + function Piwik_getOsLogoExtended($label) { $short = substr($label, 0, 3); -- cgit v1.2.3