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:
Diffstat (limited to 'plugins/DevicePlugins/functions.php')
-rw-r--r--plugins/DevicePlugins/functions.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/DevicePlugins/functions.php b/plugins/DevicePlugins/functions.php
index 30a6cf504b..020736a89e 100644
--- a/plugins/DevicePlugins/functions.php
+++ b/plugins/DevicePlugins/functions.php
@@ -16,5 +16,20 @@ function getPluginsLogo($label)
if ($label == Piwik::translate('General_Others')) {
return false;
}
- return 'plugins/Morpheus/icons/dist/plugins/' . $label . '.png';
+ $icon = 'plugins/Morpheus/icons/dist/plugins/' . $label . '.png';
+
+ if (file_exists(PIWIK_INCLUDE_PATH . '/' . $icon)) {
+ return $icon;
+ }
+
+ // try to use column icon defined in Column class
+ $columns = DevicePlugins::getAllPluginColumns();
+
+ foreach ($columns as $column) {
+ if (strtolower($label) == substr($column->getColumnName(), 7) && $column->columnIcon) {
+ return $column->columnIcon;
+ }
+ }
+
+ return false;
}