diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-03-16 06:12:02 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-03-16 06:12:02 +0300 |
commit | 54ac2bf9d949d45eb756768003a0d4e0008e0a61 (patch) | |
tree | 2842cc3cd4911dd5b473eb20302f97ecaa8f09b4 /plugins/DevicePlugins | |
parent | fe85ab09c24dc41a69bb08e39ac5ea41c43a4f66 (diff) |
possibility to define a default sort order in a report class
Diffstat (limited to 'plugins/DevicePlugins')
-rw-r--r-- | plugins/DevicePlugins/API.php | 1 | ||||
-rw-r--r-- | plugins/DevicePlugins/Reports/Base.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/plugins/DevicePlugins/API.php b/plugins/DevicePlugins/API.php index c49839e8ae..21765a981d 100644 --- a/plugins/DevicePlugins/API.php +++ b/plugins/DevicePlugins/API.php @@ -32,7 +32,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/DevicePlugins/Reports/Base.php b/plugins/DevicePlugins/Reports/Base.php index 81116f4d1d..06eebe686c 100644 --- a/plugins/DevicePlugins/Reports/Base.php +++ b/plugins/DevicePlugins/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'; |