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:
authorThomas Steur <thomas.steur@gmail.com>2015-03-16 06:12:02 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-03-16 06:12:02 +0300
commit54ac2bf9d949d45eb756768003a0d4e0008e0a61 (patch)
tree2842cc3cd4911dd5b473eb20302f97ecaa8f09b4 /plugins/Resolution
parentfe85ab09c24dc41a69bb08e39ac5ea41c43a4f66 (diff)
possibility to define a default sort order in a report class
Diffstat (limited to 'plugins/Resolution')
-rw-r--r--plugins/Resolution/API.php1
-rw-r--r--plugins/Resolution/Reports/Base.php2
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/Resolution/API.php b/plugins/Resolution/API.php
index 8a39d78e0b..767cb0ff70 100644
--- a/plugins/Resolution/API.php
+++ b/plugins/Resolution/API.php
@@ -28,7 +28,6 @@ class API extends \Piwik\Plugin\API
Piwik::checkUserHasViewAccess($idSite);
$archive = Archive::build($idSite, $period, $date, $segment);
$dataTable = $archive->getDataTable($name);
- $dataTable->filter('Sort', array(Metrics::INDEX_NB_VISITS));
$dataTable->queueFilter('ReplaceColumnNames');
$dataTable->queueFilter('ReplaceSummaryRowLabel');
return $dataTable;
diff --git a/plugins/Resolution/Reports/Base.php b/plugins/Resolution/Reports/Base.php
index 259a164113..bd2c33ffda 100644
--- a/plugins/Resolution/Reports/Base.php
+++ b/plugins/Resolution/Reports/Base.php
@@ -13,6 +13,8 @@ use Piwik\Plugins\CoreVisualizations\Visualizations\Graph;
abstract class Base extends \Piwik\Plugin\Report
{
+ protected $defaultSortColumn = 'nb_visits';
+
protected function init()
{
$this->category = 'General_VisitorSettings';