diff options
author | sgiehl <stefan@piwik.org> | 2014-11-16 00:07:01 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2014-11-16 00:07:01 +0300 |
commit | 170e5e3a3771c9b29754a051bc4f1ba61413a63a (patch) | |
tree | c33582b0c26445e72599e7175b135fe4e1dbe49f /plugins/DevicesDetection/functions.php | |
parent | dff3519bc9152076062b1cd046594103756a5d42 (diff) |
added shortlabel again to keep BC
Diffstat (limited to 'plugins/DevicesDetection/functions.php')
-rw-r--r-- | plugins/DevicesDetection/functions.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index cb4c109b22..7a797d42a1 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -217,6 +217,38 @@ function getOsFullName($label) return Piwik::translate('General_Unknown'); } +function getOsShortName($label) +{ + $shortNameMapping = array( + 'PS3' => 'PS3', + 'PSP' => 'PSP', + 'WII' => 'Wii', + 'WIU' => 'Wii U', + 'NDS' => 'DS', + 'DSI' => 'DSi', + '3DS' => '3DS', + 'PSV' => 'PS Vita', + 'WI8' => 'Win 8', + 'WI7' => 'Win 7', + 'WVI' => 'Win Vista', + 'WS3' => 'Win S2003', + 'WXP' => 'Win XP', + 'W98' => 'Win 98', + 'W2K' => 'Win 2000', + 'WNT' => 'Win NT', + 'WME' => 'Win Me', + 'W95' => 'Win 95', + 'WPH' => 'WinPhone', + 'WMO' => 'WinMo', + 'WCE' => 'Win CE', + 'WOS' => 'webOS', + ); + if (array_key_exists($label, $shortNameMapping)) { + return $shortNameMapping[$label]; + } + return getOsFullName($label); +} + /** * Returns the path to the logo for the given OS * |