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:
authormattab <matthieu.aubry@gmail.com>2013-06-17 09:54:07 +0400
committermattab <matthieu.aubry@gmail.com>2013-06-17 09:54:07 +0400
commitb22ff3499d0478843aa33c1c4924eb66f1c8fcf1 (patch)
treeacafa0104fd3cec52ea8f85308c60080ffa3a908 /core/Archive.php
parenta82321a712614f062b77955d2fe978766e0e35c6 (diff)
Creating getMinTimeProcessedForTemporaryArchive and splitting getMinTimeArchivedProcessed to make it clear.
Renaming class to Piwik_DataAccess_ArchiveSelector -- it will specialize in selecting archives
Diffstat (limited to 'core/Archive.php')
-rw-r--r--core/Archive.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/Archive.php b/core/Archive.php
index ebe0516a29..4f4717f091 100644
--- a/core/Archive.php
+++ b/core/Archive.php
@@ -41,7 +41,6 @@
*/
class Piwik_Archive
{
- const FLAG_ALL_WEBSITES_REQUESTED = 'all';
/**
* When saving DataTables in the DB, we sometimes replace the columns name by these IDs so we save up lots of bytes
* Eg. INDEX_NB_UNIQ_VISITORS is an integer: 4 bytes, but 'nb_uniq_visitors' is 16 bytes at least
@@ -103,6 +102,8 @@ class Piwik_Archive
const INDEX_GOAL_ECOMMERCE_REVENUE_DISCOUNT = 7;
const INDEX_GOAL_ECOMMERCE_ITEMS = 8;
+ const REQUEST_ALL_WEBSITES_FLAG = 'all';
+
public static function getVisitsMetricNames()
{
$names = array();
@@ -308,7 +309,7 @@ class Piwik_Archive
$allPeriods = array($oPeriod);
}
$segment = new Piwik_Segment($segment, $websiteIds);
- $idSiteIsAll = $idSites == self::FLAG_ALL_WEBSITES_REQUESTED;
+ $idSiteIsAll = $idSites == self::REQUEST_ALL_WEBSITES_FLAG;
return Piwik_Archive::factory($segment, $allPeriods, $websiteIds, $idSiteIsAll);
}
@@ -516,7 +517,7 @@ class Piwik_Archive
return $result;
}
- $archiveData = Piwik_DataAccess_Archiver::getArchiveData($archiveIds, $archiveNames, $archiveDataType, $idSubtable);
+ $archiveData = Piwik_DataAccess_ArchiveSelector::getArchiveData($archiveIds, $archiveNames, $archiveDataType, $idSubtable);
foreach ($archiveData as $row) {
// values are grouped by idsite (site ID), date1-date2 (date range), then name (field name)
$idSite = $row['idsite'];
@@ -669,7 +670,7 @@ class Piwik_Archive
*/
private function cacheArchiveIdsWithoutLaunching($plugins)
{
- $idarchivesByReport = Piwik_DataAccess_Archiver::getArchiveIds(
+ $idarchivesByReport = Piwik_DataAccess_ArchiveSelector::getArchiveIds(
$this->params->getIdSites(), $this->params->getPeriods(), $this->params->getSegment(), $plugins);
// initialize archive ID cache for each report