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@googlemail.com>2014-08-12 16:01:47 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-08-12 16:01:47 +0400
commit89297438af917f116434316dcd10b220c8ec8bfb (patch)
treebe15da00045df18b2133a940a3a37bccb3327800 /plugins
parent45528f5da5f8eeeb0d47bae4d437b8c6010c3afd (diff)
refs #5987 I think this should make sure we always get an array if MultiSites.getAll finds only one site
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/MultiSites/API.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index f64a673f23..41031fae8f 100755
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -292,6 +292,13 @@ class API extends \Piwik\Plugin\API
);
}
+ if ($multipleWebsitesRequested && $dataTable->getRowsCount() === 1 && $dataTable instanceof DataTable\Simple) {
+ $simpleTable = $dataTable;
+ $dataTable = $simpleTable->getEmptyClone();
+ $dataTable->addRow($simpleTable->getFirstRow());
+ unset($simpleTable);
+ }
+
return $dataTable;
}