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:
authorsgiehl <stefan@piwik.org>2014-12-09 00:50:44 +0300
committersgiehl <stefan@piwik.org>2014-12-09 00:50:44 +0300
commite7325c72565a92cc7ff6c6eabdbff885d9158f97 (patch)
treea72b385e75d835c2c916510f519c31ba6393831d /plugins/Resolution/functions.php
parentd974ea9bbb567b860a17c5267c04cee3613ae6dd (diff)
moved resolution and configuration reports to a new plugin
Diffstat (limited to 'plugins/Resolution/functions.php')
-rw-r--r--plugins/Resolution/functions.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/Resolution/functions.php b/plugins/Resolution/functions.php
new file mode 100644
index 0000000000..e71aaa907a
--- /dev/null
+++ b/plugins/Resolution/functions.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+
+namespace Piwik\Plugins\Resolution;
+
+use Piwik\Piwik;
+
+function getConfigurationLabel($str)
+{
+ if (strpos($str, ';') === false) {
+ return $str;
+ }
+ $values = explode(";", $str);
+
+ $os = \Piwik\Plugins\DevicesDetection\getOsFullName($values[0]);
+ $name = $values[1];
+ $browser = \Piwik\Plugins\DevicesDetection\getBrowserName($name);
+ if ($browser === false) {
+ $browser = Piwik::translate('General_Unknown');
+ }
+ $resolution = $values[2];
+ return $os . " / " . $browser . " / " . $resolution;
+}