From 0bbbdc851366a1b5cd7179a7de313caa655a6fda Mon Sep 17 00:00:00 2001 From: Thomas Steur Date: Mon, 16 Mar 2015 05:03:39 +0000 Subject: 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. --- plugins/VisitorInterest/API.php | 4 ++-- plugins/VisitorInterest/Reports/GetNumberOfVisitsByDaysSinceLast.php | 2 ++ plugins/VisitorInterest/Reports/GetNumberOfVisitsByVisitCount.php | 2 ++ plugins/VisitorInterest/Reports/GetNumberOfVisitsPerPage.php | 2 ++ plugins/VisitorInterest/Reports/GetNumberOfVisitsPerVisitDuration.php | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) (limited to 'plugins/VisitorInterest') diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php index 33f6d97b58..74f050c33a 100644 --- a/plugins/VisitorInterest/API.php +++ b/plugins/VisitorInterest/API.php @@ -33,7 +33,7 @@ class API extends \Piwik\Plugin\API public function getNumberOfVisitsPerVisitDuration($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable(Archiver::TIME_SPENT_RECORD_NAME, $idSite, $period, $date, $segment); - $dataTable->queueFilter('Sort', array('label', 'asc', true)); + $dataTable->queueFilter('Sort', array('label', 'asc', true, false)); $dataTable->queueFilter('BeautifyTimeRangeLabels', array( Piwik::translate('VisitorInterest_BetweenXYSeconds'), Piwik::translate('VisitorInterest_OneMinute'), @@ -44,7 +44,7 @@ class API extends \Piwik\Plugin\API public function getNumberOfVisitsPerPage($idSite, $period, $date, $segment = false) { $dataTable = $this->getDataTable(Archiver::PAGES_VIEWED_RECORD_NAME, $idSite, $period, $date, $segment); - $dataTable->queueFilter('Sort', array('label', 'asc', true)); + $dataTable->queueFilter('Sort', array('label', 'asc', true, false)); $dataTable->queueFilter('BeautifyRangeLabels', array( Piwik::translate('VisitorInterest_OnePage'), Piwik::translate('VisitorInterest_NPages'))); diff --git a/plugins/VisitorInterest/Reports/GetNumberOfVisitsByDaysSinceLast.php b/plugins/VisitorInterest/Reports/GetNumberOfVisitsByDaysSinceLast.php index c5a2aa471b..fd935d47c6 100644 --- a/plugins/VisitorInterest/Reports/GetNumberOfVisitsByDaysSinceLast.php +++ b/plugins/VisitorInterest/Reports/GetNumberOfVisitsByDaysSinceLast.php @@ -14,6 +14,8 @@ use Piwik\Plugins\VisitorInterest\Columns\VisitsByDaysSinceLastVisit; class GetNumberOfVisitsByDaysSinceLast extends Base { + protected $defaultSortColumn = ''; + protected function init() { parent::init(); diff --git a/plugins/VisitorInterest/Reports/GetNumberOfVisitsByVisitCount.php b/plugins/VisitorInterest/Reports/GetNumberOfVisitsByVisitCount.php index 0cebfe2e2a..74dbf69c14 100644 --- a/plugins/VisitorInterest/Reports/GetNumberOfVisitsByVisitCount.php +++ b/plugins/VisitorInterest/Reports/GetNumberOfVisitsByVisitCount.php @@ -16,6 +16,8 @@ use Piwik\Plugins\CoreHome\Columns\Metrics\VisitsPercent; class GetNumberOfVisitsByVisitCount extends Base { + protected $defaultSortColumn = ''; + protected function init() { parent::init(); diff --git a/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerPage.php b/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerPage.php index 355b694406..de15ed5f5f 100644 --- a/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerPage.php +++ b/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerPage.php @@ -16,6 +16,8 @@ use Piwik\Plugins\VisitorInterest\Columns\PagesPerVisit; class GetNumberOfVisitsPerPage extends Base { + protected $defaultSortColumn = ''; + protected function init() { parent::init(); diff --git a/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerVisitDuration.php b/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerVisitDuration.php index f518ce47c2..ead1849b7f 100644 --- a/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerVisitDuration.php +++ b/plugins/VisitorInterest/Reports/GetNumberOfVisitsPerVisitDuration.php @@ -16,6 +16,8 @@ use Piwik\Plugins\VisitorInterest\Columns\VisitDuration; class GetNumberOfVisitsPerVisitDuration extends Base { + protected $defaultSortColumn = ''; + protected function init() { parent::init(); -- cgit v1.2.3