diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-08-07 14:48:13 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-08-31 18:07:12 +0300 |
commit | 4d02abdbb61c7883e3a13e0fde93df49fdeae9fc (patch) | |
tree | ad1e425fd1d067cb8e1a842317eba228460cb19c /plugins/ImageGraph | |
parent | 31ded59b1cccdedef7f1b52b00977e15d486b06e (diff) |
API.getReportMetadata should work only for one site
Diffstat (limited to 'plugins/ImageGraph')
-rw-r--r-- | plugins/ImageGraph/ImageGraph.php | 7 |
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'; |