From a4f8566d95c7c9c172f411c78c01e281ed5b34e6 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Sat, 6 May 2017 10:44:14 +0200 Subject: Move old brand icons to piwik icons (#11635) * move old brand icons to piwik icons * update submodule * fix some tests * update submodule * fix another test * Updates screenshots * update UI test screenshots * update system test files --- plugins/DevicesDetection/functions.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/DevicesDetection/functions.php') 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) -- cgit v1.2.3