diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-03 09:41:53 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-03 09:41:53 +0400 |
commit | 3412d1bdc71e9d5f3eed2c22df3cc4e2913af629 (patch) | |
tree | 7916751e658eef18ce8cb99e121c0f3cc1c0f935 /plugins/Actions | |
parent | 81c7a6b063622e46b7e941e02bdd1419f3f59e81 (diff) |
- changing ways of applying filters to a datatable, now $table->filter('Piwik_DataTable_Filter_Sort', array ('nb_visits', 'desc'));
- refs #640 now accurately reporting nb_uniq_visitors in all reports
- adding tests
Diffstat (limited to 'plugins/Actions')
-rw-r--r-- | plugins/Actions/API.php | 2 | ||||
-rw-r--r-- | plugins/Actions/Actions.php | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 216713629f..65a399e0bb 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -46,7 +46,7 @@ class Piwik_Actions_API { $dataTable = $archive->getDataTable($name, $idSubtable); } - $filter = new Piwik_DataTable_Filter_Sort($dataTable, 'nb_visits', 'desc', $naturalSort = false, $expanded); + $dataTable->filter('Piwik_DataTable_Filter_Sort', array('nb_visits', 'desc', $naturalSort = false, $expanded)); $dataTable->queueFilter('Piwik_DataTable_Filter_ReplaceSummaryRowLabel'); return $dataTable; } diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 56b0260603..66ae089813 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -10,7 +10,6 @@ */ /** - * * @package Piwik_Actions */ class Piwik_Actions extends Piwik_Plugin @@ -30,7 +29,6 @@ class Piwik_Actions extends Piwik_Plugin 'homepage' => 'http://piwik.org/', 'version' => '0.1', ); - return $info; } @@ -65,16 +63,22 @@ class Piwik_Actions extends Piwik_Plugin Piwik_AddMenu('Actions_Actions', 'Actions_SubmenuOutlinks', array('module' => 'Actions', 'action' => 'getOutlinks')); Piwik_AddMenu('Actions_Actions', 'Actions_SubmenuDownloads', array('module' => 'Actions', 'action' => 'getDownloads')); } - + + static protected $invalidSummedColumnNameToRenamedName = array( + 'nb_uniq_visitors' => 'sum_daily_nb_uniq_visitors', + 'entry_nb_uniq_visitors' => 'sum_daily_entry_nb_uniq_visitors', + 'exit_nb_uniq_visitors' => 'sum_daily_exit_nb_uniq_visitors', + ); + function archivePeriod( $notification ) { $archiveProcessing = $notification->getNotificationObject(); - $dataTableToSum = array( + $dataTableToSum = array( 'Actions_actions', 'Actions_downloads', 'Actions_outlink', ); - $archiveProcessing->archiveDataTable($dataTableToSum, $this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $this->columnToSortByBeforeTruncation); + $archiveProcessing->archiveDataTable($dataTableToSum, self::$invalidSummedColumnNameToRenamedName, $this->maximumRowsInDataTableLevelZero, $this->maximumRowsInSubDataTable, $this->columnToSortByBeforeTruncation); } /** |