diff options
author | Timo Besenreuther <timo.besenreuther@gmail.com> | 2013-03-20 20:31:11 +0400 |
---|---|---|
committer | Timo Besenreuther <timo.besenreuther@gmail.com> | 2013-03-20 20:31:11 +0400 |
commit | 3ac47e89eb7cc6024cffad435e9a6ef2a29488ff (patch) | |
tree | 997a029d03873eb05de51d41e9a295dda0873aec /plugins/Live/Controller.php | |
parent | 55727244bb9c1375bc9f19c720836f3400f0e155 (diff) |
visitor log improvements
* use a limit for the number of actions that are loaded for every visit. without a limit, the web server might crash (e.g. when there are 100K+ page views in one visit after a log import)
* regular pagination in visitor log. (a) performance improvement: use indexes in the select query. (b) bug fix: the old logic was incorrect. in one setup, there are 10K+ visits but the visitor log only showed one full page and one page with one visit.
* removed reference to trunk from tests read me
Diffstat (limited to 'plugins/Live/Controller.php')
-rw-r--r-- | plugins/Live/Controller.php | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php index 6fdc9fa9e4..080d6da409 100644 --- a/plugins/Live/Controller.php +++ b/plugins/Live/Controller.php @@ -49,12 +49,6 @@ class Piwik_Live_Controller extends Piwik_Controller public function getVisitorLog($fetch = false) { - // If previous=1 is set, user clicked previous - // we can't deal with previous so we force display of the first page - if(Piwik_Common::getRequestVar('previous', 0, 'int') == 1) { - $_GET['maxIdVisit'] = ''; - } - $view = Piwik_ViewDataTable::factory(); $view->init( $this->pluginName, __FUNCTION__, @@ -83,9 +77,13 @@ class Piwik_Live_Controller extends Piwik_Controller } $view->setReportDocumentation(Piwik_Translate('Live_VisitorLogDocumentation', array('<br />', '<br />'))); - $view->setCustomParameter('dataTablePreviousIsFirst', 1); + + // set a very high row count so that the next link in the footer of the data table is always shown + $view->setCustomParameter('totalRows', 10000000); + $view->setCustomParameter('filterEcommerce', Piwik_Common::getRequestVar('filterEcommerce', 0, 'int')); $view->setCustomParameter('pageUrlNotDefined', Piwik_Translate('General_NotDefined', Piwik_Translate('Actions_ColumnPageURL'))); + return $this->renderView($view, $fetch); } |