diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-01-29 06:48:23 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-02-13 08:23:10 +0300 |
commit | 8ef47c8e4a3fb0094b4b0c19df8ed18c58cf7a6f (patch) | |
tree | 162315afc7f5a5bc0c8840eff30251a76b665b6f /core/Plugin/Visualization.php | |
parent | ec8dc0f150d71b752188dac3d01d29950ae6f869 (diff) |
refs #4633 open segmented visitor log with one click on a row
Diffstat (limited to 'core/Plugin/Visualization.php')
-rw-r--r-- | core/Plugin/Visualization.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php index 8c843806de..15b468e362 100644 --- a/core/Plugin/Visualization.php +++ b/core/Plugin/Visualization.php @@ -19,6 +19,7 @@ use Piwik\NoAccessException; use Piwik\Option; use Piwik\Period; use Piwik\Piwik; +use Piwik\Plugins\API\API as ApiApi; use Piwik\Plugins\PrivacyManager\PrivacyManager; use Piwik\View; use Piwik\ViewDataTable\Manager as ViewDataTableManager; @@ -207,6 +208,7 @@ class Visualization extends ViewDataTable $view->visualization = $this; $view->visualizationTemplate = static::TEMPLATE_FILE; $view->visualizationCssClass = $this->getDefaultDataTableCssClass(); + $view->reportMetdadata = $this->getReportMetadata(); if (null === $this->dataTable) { $view->dataTable = null; @@ -231,6 +233,22 @@ class Visualization extends ViewDataTable return $view; } + private function getReportMetadata() + { + $request = $this->request->getRequestArray() + $_GET + $_POST; + + $idSite = Common::getRequestVar('idSite', null, 'string', $request); + $module = $this->requestConfig->getApiModuleToRequest(); + $action = $this->requestConfig->getApiMethodToRequest(); + $metadata = ApiApi::getInstance()->getMetadata($idSite, $module, $action); + + if (!empty($metadata)) { + return array_shift($metadata); + } + + return false; + } + private function overrideSomeConfigPropertiesIfNeeded() { if (empty($this->config->footer_icons)) { |