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
diff options
context:
space:
mode:
authorMatthieu Aubry <mattab@users.noreply.github.com>2017-04-26 09:52:46 +0300
committerGitHub <noreply@github.com>2017-04-26 09:52:46 +0300
commit317700513cc732bb2371edbe645555feadbbc545 (patch)
treeefc28c578903563cd72d8436dbefcec32ab161c7 /plugins/DevicesDetection
parentbc8222d451337185db343486319af6782b009148 (diff)
parent199e43ef5809d09803416db72ce0ace6c9a4d895 (diff)
Merge pull request #11651 from piwik/3.x-dev3.0.4-b1
Release Piwik 3.0.4-b1
Diffstat (limited to 'plugins/DevicesDetection')
-rw-r--r--plugins/DevicesDetection/functions.php23
-rw-r--r--plugins/DevicesDetection/images/screens/camera.pngbin644 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/carbrowser.pngbin3218 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/computer.pngbin550 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/console.pngbin687 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/dual.pngbin1040 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/mobile.pngbin466 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/normal.pngbin1036 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/smartphone.pngbin547 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/tablet.pngbin602 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/tv.pngbin644 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/unknown.pngbin303 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/images/screens/wide.pngbin871 -> 0 bytes
-rw-r--r--plugins/DevicesDetection/tests/System/expected/test___DevicesDetection.getType_day.xml24
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
deleted file mode 100644
index bd9deed867..0000000000
--- a/plugins/DevicesDetection/images/screens/camera.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/carbrowser.png b/plugins/DevicesDetection/images/screens/carbrowser.png
deleted file mode 100644
index 4200115cc8..0000000000
--- a/plugins/DevicesDetection/images/screens/carbrowser.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/computer.png b/plugins/DevicesDetection/images/screens/computer.png
deleted file mode 100644
index 9763689e6f..0000000000
--- a/plugins/DevicesDetection/images/screens/computer.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/console.png b/plugins/DevicesDetection/images/screens/console.png
deleted file mode 100644
index 78bcdfa660..0000000000
--- a/plugins/DevicesDetection/images/screens/console.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/dual.png b/plugins/DevicesDetection/images/screens/dual.png
deleted file mode 100644
index 0311d7c599..0000000000
--- a/plugins/DevicesDetection/images/screens/dual.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/mobile.png b/plugins/DevicesDetection/images/screens/mobile.png
deleted file mode 100644
index 77e59f4b84..0000000000
--- a/plugins/DevicesDetection/images/screens/mobile.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/normal.png b/plugins/DevicesDetection/images/screens/normal.png
deleted file mode 100644
index a89b2421c5..0000000000
--- a/plugins/DevicesDetection/images/screens/normal.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/smartphone.png b/plugins/DevicesDetection/images/screens/smartphone.png
deleted file mode 100644
index c5bfb31ca4..0000000000
--- a/plugins/DevicesDetection/images/screens/smartphone.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/tablet.png b/plugins/DevicesDetection/images/screens/tablet.png
deleted file mode 100644
index e6ac30bdd8..0000000000
--- a/plugins/DevicesDetection/images/screens/tablet.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/tv.png b/plugins/DevicesDetection/images/screens/tv.png
deleted file mode 100644
index fb6db07cf4..0000000000
--- a/plugins/DevicesDetection/images/screens/tv.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/unknown.png b/plugins/DevicesDetection/images/screens/unknown.png
deleted file mode 100644
index 166a505bbc..0000000000
--- a/plugins/DevicesDetection/images/screens/unknown.png
+++ /dev/null
Binary files differ
diff --git a/plugins/DevicesDetection/images/screens/wide.png b/plugins/DevicesDetection/images/screens/wide.png
deleted file mode 100644
index 8a7bb13d7e..0000000000
--- a/plugins/DevicesDetection/images/screens/wide.png
+++ /dev/null
Binary files differ
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