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-04-01 01:35:42 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-04-01 02:50:46 +0300
commit45f2a470348c03f67c14e401bc54117823600ddd (patch)
tree58fb8b446a03c0a85124ef95909c859698ed282a /core/Archive.php
parentc881db234a884f127e18dcafac84c9e6407fec17 (diff)
Improve all websites dashboard performance when using range date
Diffstat (limited to 'core/Archive.php')
-rw-r--r--core/Archive.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/Archive.php b/core/Archive.php
index 2efe230318..8bddda0922 100644
--- a/core/Archive.php
+++ b/core/Archive.php
@@ -646,7 +646,7 @@ class Archive
$doneFlags = array();
$archiveGroups = array();
foreach ($plugins as $plugin) {
- $doneFlag = $this->getDoneStringForPlugin($plugin);
+ $doneFlag = $this->getDoneStringForPlugin($plugin, $this->params->getIdSites());
$doneFlags[$doneFlag] = true;
if (!isset($this->idarchives[$doneFlag])) {
@@ -731,7 +731,7 @@ class Archive
// initialize archive ID cache for each report
foreach ($plugins as $plugin) {
- $doneFlag = $this->getDoneStringForPlugin($plugin);
+ $doneFlag = $this->getDoneStringForPlugin($plugin, $this->params->getIdSites());
$this->initializeArchiveIdCache($doneFlag);
}
@@ -749,10 +749,10 @@ class Archive
* @param string $plugin
* @return string
*/
- private function getDoneStringForPlugin($plugin)
+ private function getDoneStringForPlugin($plugin, $idSites)
{
return Rules::getDoneStringFlagFor(
- $this->params->getIdSites(),
+ $idSites,
$this->params->getSegment(),
$this->getPeriodLabel(),
$plugin
@@ -893,9 +893,11 @@ class Archive
$periodString = $period->getRangeString();
+ $idSites = array($site->getId());
+
// process for each plugin as well
foreach ($archiveGroups as $plugin) {
- $doneFlag = $this->getDoneStringForPlugin($plugin);
+ $doneFlag = $this->getDoneStringForPlugin($plugin, $idSites);
$this->initializeArchiveIdCache($doneFlag);
$idArchive = $archiveLoader->prepareArchive($plugin);