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/Provider | |
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/Provider')
-rw-r--r-- | plugins/Provider/API.php | 2 | ||||
-rw-r--r-- | plugins/Provider/Provider.php | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/plugins/Provider/API.php b/plugins/Provider/API.php index 768f02e155..b2bca16074 100644 --- a/plugins/Provider/API.php +++ b/plugins/Provider/API.php @@ -33,7 +33,7 @@ class Piwik_Provider_API Piwik::checkUserHasViewAccess( $idSite ); $archive = Piwik_Archive::build($idSite, $period, $date ); $dataTable = $archive->getDataTable('Provider_hostnameExt'); - $filter = new Piwik_DataTable_Filter_Sort($dataTable, Piwik_Archive::INDEX_NB_VISITS); + $dataTable->filter('Piwik_DataTable_Filter_Sort', array(Piwik_Archive::INDEX_NB_VISITS)); $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackAddMetadata', array('label', 'url', 'Piwik_getHostnameUrl')); $dataTable->queueFilter('Piwik_DataTable_Filter_ColumnCallbackReplace', array('label', 'Piwik_getHostnameName')); $dataTable->queueFilter('Piwik_DataTable_Filter_ReplaceColumnNames'); diff --git a/plugins/Provider/Provider.php b/plugins/Provider/Provider.php index 556dbfce99..0dcdf42426 100644 --- a/plugins/Provider/Provider.php +++ b/plugins/Provider/Provider.php @@ -80,12 +80,10 @@ class Piwik_Provider extends Piwik_Plugin function archivePeriod( $notification ) { $archiveProcessing = $notification->getNotificationObject(); - $dataTableToSum = array( - 'Provider_hostnameExt', - ); + $dataTableToSum = array( 'Provider_hostnameExt' ); $archiveProcessing->archiveDataTable($dataTableToSum); } - + /** * Archive the provider count */ |