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:
authorThomas Steur <thomas.steur@gmail.com>2016-08-07 14:48:13 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-08-31 18:07:12 +0300
commit4d02abdbb61c7883e3a13e0fde93df49fdeae9fc (patch)
treead1e425fd1d067cb8e1a842317eba228460cb19c /plugins/ImageGraph
parent31ded59b1cccdedef7f1b52b00977e15d486b06e (diff)
API.getReportMetadata should work only for one site
Diffstat (limited to 'plugins/ImageGraph')
-rw-r--r--plugins/ImageGraph/ImageGraph.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/ImageGraph/ImageGraph.php b/plugins/ImageGraph/ImageGraph.php
index 9869d37081..86a1d45cfc 100644
--- a/plugins/ImageGraph/ImageGraph.php
+++ b/plugins/ImageGraph/ImageGraph.php
@@ -52,14 +52,13 @@ class ImageGraph extends \Piwik\Plugin
*/
public function getReportMetadata(&$reports, $info)
{
- $idSites = $info['idSites'];
+ $idSite = $info['idSite'];
// If only one website is selected, we add the Graph URL
- if (count($idSites) != 1) {
+ if (empty($idSite)) {
return;
}
- $idSite = reset($idSites);
-
+
// in case API.getReportMetadata was not called with date/period we use sane defaults
if (empty($info['period'])) {
$info['period'] = 'day';