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 | |
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')
14 files changed, 17 insertions, 30 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; } diff --git a/plugins/DevicesDetection/images/screens/camera.png b/plugins/DevicesDetection/images/screens/camera.png Binary files differdeleted file mode 100644 index bd9deed867..0000000000 --- a/plugins/DevicesDetection/images/screens/camera.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/carbrowser.png b/plugins/DevicesDetection/images/screens/carbrowser.png Binary files differdeleted file mode 100644 index 4200115cc8..0000000000 --- a/plugins/DevicesDetection/images/screens/carbrowser.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/computer.png b/plugins/DevicesDetection/images/screens/computer.png Binary files differdeleted file mode 100644 index 9763689e6f..0000000000 --- a/plugins/DevicesDetection/images/screens/computer.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/console.png b/plugins/DevicesDetection/images/screens/console.png Binary files differdeleted file mode 100644 index 78bcdfa660..0000000000 --- a/plugins/DevicesDetection/images/screens/console.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/dual.png b/plugins/DevicesDetection/images/screens/dual.png Binary files differdeleted file mode 100644 index 0311d7c599..0000000000 --- a/plugins/DevicesDetection/images/screens/dual.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/mobile.png b/plugins/DevicesDetection/images/screens/mobile.png Binary files differdeleted file mode 100644 index 77e59f4b84..0000000000 --- a/plugins/DevicesDetection/images/screens/mobile.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/normal.png b/plugins/DevicesDetection/images/screens/normal.png Binary files differdeleted file mode 100644 index a89b2421c5..0000000000 --- a/plugins/DevicesDetection/images/screens/normal.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/smartphone.png b/plugins/DevicesDetection/images/screens/smartphone.png Binary files differdeleted file mode 100644 index c5bfb31ca4..0000000000 --- a/plugins/DevicesDetection/images/screens/smartphone.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/tablet.png b/plugins/DevicesDetection/images/screens/tablet.png Binary files differdeleted file mode 100644 index e6ac30bdd8..0000000000 --- a/plugins/DevicesDetection/images/screens/tablet.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/tv.png b/plugins/DevicesDetection/images/screens/tv.png Binary files differdeleted file mode 100644 index fb6db07cf4..0000000000 --- a/plugins/DevicesDetection/images/screens/tv.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/unknown.png b/plugins/DevicesDetection/images/screens/unknown.png Binary files differdeleted file mode 100644 index 166a505bbc..0000000000 --- a/plugins/DevicesDetection/images/screens/unknown.png +++ /dev/null diff --git a/plugins/DevicesDetection/images/screens/wide.png b/plugins/DevicesDetection/images/screens/wide.png Binary files differdeleted file mode 100644 index 8a7bb13d7e..0000000000 --- a/plugins/DevicesDetection/images/screens/wide.png +++ /dev/null diff --git a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml index 7db59b5306..bab8a9f0cf 100644 --- a/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml +++ b/plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml @@ -19,7 +19,7 @@ <nb_conversions>2</nb_conversions> <revenue>52.26</revenue> <segment>deviceType==tablet</segment> - <logo>plugins/DevicesDetection/images/screens/tablet.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/tablet.png</logo> </row> <row> <label>Smartphone</label> @@ -40,7 +40,7 @@ <nb_conversions>2</nb_conversions> <revenue>52.26</revenue> <segment>deviceType==smartphone</segment> - <logo>plugins/DevicesDetection/images/screens/smartphone.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/smartphone.png</logo> </row> <row> <label>Unknown</label> @@ -60,7 +60,7 @@ </goals> <nb_conversions>2</nb_conversions> <revenue>52.26</revenue> - <logo>plugins/DevicesDetection/images/screens/unknown.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/unknown.png</logo> </row> <row> <label>Desktop</label> @@ -81,7 +81,7 @@ <nb_conversions>1</nb_conversions> <revenue>10</revenue> <segment>deviceType==desktop</segment> - <logo>plugins/DevicesDetection/images/screens/normal.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/desktop.png</logo> </row> <row> <label>Tv</label> @@ -94,48 +94,48 @@ <bounce_count>1</bounce_count> <nb_visits_converted>0</nb_visits_converted> <segment>deviceType==tv</segment> - <logo>plugins/DevicesDetection/images/screens/tv.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/tv.png</logo> </row> <row> <label>Camera</label> <nb_visits>0</nb_visits> <segment>deviceType==camera</segment> - <logo>plugins/DevicesDetection/images/screens/camera.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/camera.png</logo> </row> <row> <label>Car browser</label> <nb_visits>0</nb_visits> <segment>deviceType==car+browser</segment> - <logo>plugins/DevicesDetection/images/screens/carbrowser.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/car_browser.png</logo> </row> <row> <label>Console</label> <nb_visits>0</nb_visits> <segment>deviceType==console</segment> - <logo>plugins/DevicesDetection/images/screens/console.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/console.png</logo> </row> <row> <label>Feature phone</label> <nb_visits>0</nb_visits> <segment>deviceType==feature+phone</segment> - <logo>plugins/DevicesDetection/images/screens/mobile.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/feature_phone.png</logo> </row> <row> <label>Phablet</label> <nb_visits>0</nb_visits> <segment>deviceType==phablet</segment> - <logo>plugins/DevicesDetection/images/screens/unknown.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/phablet.png</logo> </row> <row> <label>Portable media player</label> <nb_visits>0</nb_visits> <segment>deviceType==portable+media+player</segment> - <logo>plugins/DevicesDetection/images/screens/unknown.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/portable_media_player.png</logo> </row> <row> <label>Smart display</label> <nb_visits>0</nb_visits> <segment>deviceType==smart+display</segment> - <logo>plugins/DevicesDetection/images/screens/unknown.png</logo> + <logo>plugins/Morpheus/icons/dist/devices/smart_display.png</logo> </row> </result>
\ No newline at end of file |