diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-04-26 09:52:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 09:52:46 +0300 |
commit | 317700513cc732bb2371edbe645555feadbbc545 (patch) | |
tree | efc28c578903563cd72d8436dbefcec32ab161c7 /plugins/DevicesDetection/functions.php | |
parent | bc8222d451337185db343486319af6782b009148 (diff) | |
parent | 199e43ef5809d09803416db72ce0ace6c9a4d895 (diff) |
Merge pull request #11651 from piwik/3.x-dev3.0.4-b1
Release Piwik 3.0.4-b1
Diffstat (limited to 'plugins/DevicesDetection/functions.php')
-rw-r--r-- | plugins/DevicesDetection/functions.php | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index af821c43c7..8aa6f312d3 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -155,26 +155,13 @@ function getDeviceTypeLogo($label) { if (is_numeric($label) && in_array($label, DeviceParser::getAvailableDeviceTypes())) { $label = array_search($label, DeviceParser::getAvailableDeviceTypes()); - } - - $label = strtolower($label); - - $deviceTypeLogos = Array( - "desktop" => "normal.png", - "smartphone" => "smartphone.png", - "tablet" => "tablet.png", - "tv" => "tv.png", - "feature phone" => "mobile.png", - "console" => "console.png", - "car browser" => "carbrowser.png", - "camera" => "camera.png"); - - if (!array_key_exists($label, $deviceTypeLogos)) { - $label = 'unknown.png'; + $label = strtolower($label); + $label = str_replace(' ', '_', $label); } else { - $label = $deviceTypeLogos[$label]; + $label = "unknown"; } - $path = 'plugins/DevicesDetection/images/screens/' . $label; + + $path = 'plugins/Morpheus/icons/dist/devices/' . $label . ".png"; return $path; } |