diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-03-16 08:03:39 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-03-18 03:15:08 +0300 |
commit | 0bbbdc851366a1b5cd7179a7de313caa655a6fda (patch) | |
tree | 1fd3d8c8a8369f25f4b45ff7b7b06b731c9f225a /core/Plugin/Report.php | |
parent | f1894a1aee763f840a6d541aec6db9ca2c05337e (diff) |
Various performance improvements and bugfixes.
Imporves performance for Archiving and Range dates. Makes all kind of
reports faster as well. Fixed bugs in labelFilter, reports total calculation
and more.
Diffstat (limited to 'core/Plugin/Report.php')
-rw-r--r-- | core/Plugin/Report.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index dfbe6e50cf..c69792ba9c 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -14,6 +14,7 @@ use Piwik\Cache; use Piwik\CacheId; use Piwik\Columns\Dimension; use Piwik\DataTable; +use Piwik\DataTable\Filter\Sort; use Piwik\Menu\MenuReporting; use Piwik\Metrics; use Piwik\Cache as PiwikCache; @@ -193,7 +194,14 @@ class Report * * @var string|int */ - protected $defaultSortColumn = ''; + protected $defaultSortColumn = 'nb_visits'; + + /** + * Default sort desc. If true will sort by default desc, if false will sort by default asc + * + * @var bool + */ + protected $defaultSortOrderDesc = true; /** * @var array @@ -594,6 +602,18 @@ class Report } /** + * @ignore + */ + public function getDefaultSortOrder() + { + if ($this->defaultSortOrderDesc) { + return Sort::ORDER_DESC; + } + + return Sort::ORDER_ASC; + } + + /** * Get the list of related reports if there are any. They will be displayed for instance below a report as a * recommended related report. * |