diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-05-09 12:42:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 12:42:21 +0300 |
commit | 41e37ae7cb965bf152ee9bd60745f454a356f769 (patch) | |
tree | 74576c62377b8658012131860920d161525b75b8 /plugins/DevicesDetection/functions.php | |
parent | 317700513cc732bb2371edbe645555feadbbc545 (diff) | |
parent | 125d502da360f84476ae22a5249ab3db3045d3dd (diff) |
Merge pull request #11679 from piwik/3.x-dev3.0.4-b3
Release Piwik 3.0.4-b3
Diffstat (limited to 'plugins/DevicesDetection/functions.php')
-rw-r--r-- | plugins/DevicesDetection/functions.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index 8aa6f312d3..663e3361e9 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -16,13 +16,12 @@ use DeviceDetector\Parser\Client\Browser AS BrowserParser; function getBrandLogo($label) { + $path = 'plugins/Morpheus/icons/dist/brand/%s.png'; $label = preg_replace("/[^a-z0-9_-]+/i", "_", $label); - $path = dirname(__FILE__) . '/images/brand/' . $label . '.png'; - if (file_exists($path)) { - return 'plugins/DevicesDetection/images/brand/' . $label . '.png'; - } else { - return 'plugins/DevicesDetection/images/brand/Unknown.png'; + if (!file_exists(PIWIK_INCLUDE_PATH . '/' . sprintf($path, $label))) { + $label = "unk"; } + return sprintf($path, $label); } function getBrowserFamilyFullName($label) |