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:
authormatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-04-03 09:41:53 +0400
committermatt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2009-04-03 09:41:53 +0400
commit3412d1bdc71e9d5f3eed2c22df3cc4e2913af629 (patch)
tree7916751e658eef18ce8cb99e121c0f3cc1c0f935 /plugins/UserCountry
parent81c7a6b063622e46b7e941e02bdd1419f3f59e81 (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/UserCountry')
-rw-r--r--plugins/UserCountry/API.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php
index 70f404608a..1e9df9b589 100644
--- a/plugins/UserCountry/API.php
+++ b/plugins/UserCountry/API.php
@@ -32,9 +32,9 @@ class Piwik_UserCountry_API
{
$dataTable = $this->getDataTable('UserCountry_country', $idSite, $period, $date);
// apply filter on the whole datatable in order the inline search to work (searches are done on "beautiful" label)
- $filter = new Piwik_DataTable_Filter_ColumnCallbackAddMetadata($dataTable, 'label', 'code', create_function('$label', 'return $label;'));
- $filter = new Piwik_DataTable_Filter_ColumnCallbackAddMetadata($dataTable, 'label', 'logo', 'Piwik_getFlagFromCode');
- $filter = new Piwik_DataTable_Filter_ColumnCallbackReplace($dataTable, 'label', 'Piwik_CountryTranslate');
+ $dataTable->filter('Piwik_DataTable_Filter_ColumnCallbackAddMetadata', array('label', 'code', create_function('$label', 'return $label;')));
+ $dataTable->filter('Piwik_DataTable_Filter_ColumnCallbackAddMetadata', array('label', 'logo', 'Piwik_getFlagFromCode'));
+ $dataTable->filter('Piwik_DataTable_Filter_ColumnCallbackReplace', array('label', 'Piwik_CountryTranslate'));
$dataTable->queueFilter('Piwik_DataTable_Filter_AddConstantMetadata', array('logoWidth', 18));
$dataTable->queueFilter('Piwik_DataTable_Filter_AddConstantMetadata', array('logoHeight', 12));
return $dataTable;
@@ -53,7 +53,7 @@ class Piwik_UserCountry_API
Piwik::checkUserHasViewAccess( $idSite );
$archive = Piwik_Archive::build($idSite, $period, $date );
$dataTable = $archive->getDataTable($name);
- $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_ReplaceColumnNames');
return $dataTable;
}