diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-03-30 06:22:03 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-03-30 06:22:03 +0400 |
commit | 241cd5c015c46945140be70c7daec15e166de29c (patch) | |
tree | 6c7740e8e5dffaa4006b9208324a1952bac49469 /plugins/Referers/API.php | |
parent | 7b3d0025c861bff8d9230faafae5d6ffff8f912c (diff) |
- fixing recently introduced sorting issue, refactoring, cleaning up the generic filters concept by removing the automatic sorting of data
- fixing issue when executing unit tests would invalidate tmp/cache/tracker files
- fixed edge case issue when calling several apis from one http request, and requesting recursive output, it was failing in some random cases
- adding a unit test that calls all callable api methods and check for non empty output
-
Diffstat (limited to 'plugins/Referers/API.php')
-rw-r--r-- | plugins/Referers/API.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Referers/API.php b/plugins/Referers/API.php index 4eaac34f24..78635c0e57 100644 --- a/plugins/Referers/API.php +++ b/plugins/Referers/API.php @@ -39,20 +39,20 @@ class Piwik_Referers_API if($expanded) { $dataTable = $archive->getDataTableExpanded($name, $idSubtable); - $dataTable->enableRecursiveSort(); } else { $dataTable = $archive->getDataTable($name, $idSubtable); } - $dataTable->queueFilter('Piwik_DataTable_Filter_ReplaceColumnNames'); + $filter = new Piwik_DataTable_Filter_Sort($dataTable, Piwik_Archive::INDEX_NB_VISITS, 'desc', $naturalSort = false, $expanded); + $dataTable->queueFilter('Piwik_DataTable_Filter_ReplaceColumnNames', array($expanded)); $dataTable->queueFilter('Piwik_DataTable_Filter_ReplaceSummaryRowLabel'); return $dataTable; } function getRefererType($idSite, $period, $date) { - $dataTable = $this->getDataTable('Referers_type',$idSite, $period, $date, $expanded = false); + $dataTable = $this->getDataTable('Referers_type', $idSite, $period, $date, $expanded = false); $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackReplace', array('label', 'Piwik_getRefererTypeLabel')); return $dataTable; } |