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:
authormattpiwik <matthieu.aubry@gmail.com>2011-02-17 10:30:40 +0300
committermattpiwik <matthieu.aubry@gmail.com>2011-02-17 10:30:40 +0300
commit2926d9d0554882630394d43fe60674f8d511bf4b (patch)
tree7332ab1ed0274284a736ba985f390dd4a848e87e /plugins/Live/Controller.php
parent620fe2a232a255790b78a1ff94ae409f518b4171 (diff)
Fixes #2054, #2076, #1947
* Visitor Log: offset now removed from Live API all together. As a result, Previous< in the datatable footer will return to the start, this could be improved but OK for now. Offset for next is the ID Visit as before * Live! widget: offset is now the timestamp, so the request hits the INDEX * This should fix most of the reordering bug: well now it should load on the top, the visits that have been updated since last refresh, and it deletes previous visit rows that are being updated git-svn-id: http://dev.piwik.org/svn/trunk@3922 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/Live/Controller.php')
-rw-r--r--plugins/Live/Controller.php23
1 files changed, 5 insertions, 18 deletions
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index 63941dd4c9..0e23feeba9 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -15,12 +15,6 @@
*/
class Piwik_Live_Controller extends Piwik_Controller
{
- function __construct()
- {
- parent::__construct();
- $this->minIdVisit = Piwik_Common::getRequestVar('minIdVisit', 0, 'int');
- }
-
function index()
{
$this->widget(true);
@@ -41,8 +35,6 @@ class Piwik_Live_Controller extends Piwik_Controller
public function getVisitorLog($fetch = false)
{
- $limit = 20;
- $_GET['limit'] = $limit;
$view = Piwik_ViewDataTable::factory();
$view->init( $this->pluginName,
__FUNCTION__,
@@ -57,10 +49,10 @@ class Piwik_Live_Controller extends Piwik_Controller
//'serverDatePretty', 'serverTimePretty', 'actionDetails'
$view->disableGenericFilters();
$view->disableSort();
- $view->setLimit($limit);
$view->setTemplate("Live/templates/visitorLog.tpl");
$view->setSortedColumn('idVisit', 'ASC');
$view->disableSearchBox();
+ $view->setLimit(20);
$view->disableOffsetInformation();
// "Include low population" link won't be displayed under this table
$view->disableExcludeLowPopulation();
@@ -68,6 +60,7 @@ class Piwik_Live_Controller extends Piwik_Controller
$view->disableShowAllViewsIcons();
// disable the button "show more datas"
$view->disableShowAllColumns();
+
// disable the RSS feed
$view->disableShowExportAsRssFeed();
return $this->renderView($view, $fetch);
@@ -78,7 +71,9 @@ class Piwik_Live_Controller extends Piwik_Controller
$view = Piwik_View::factory('lastVisits');
$view->idSite = $this->idSite;
- $view->visitors = $this->getLastVisits(10);
+ $api = new Piwik_API_Request("method=Live.getLastVisits&idSite=$this->idSite&limit=10&format=php&serialize=0&disable_generic_filters=1");
+ $visitors = $api->process();
+ $view->visitors = $visitors;
$rendered = $view->render($fetch);
@@ -89,14 +84,6 @@ class Piwik_Live_Controller extends Piwik_Controller
echo $rendered;
}
- public function getLastVisits($limit = 10)
- {
- $api = new Piwik_API_Request("method=Live.getLastVisits&idSite=$this->idSite&limit=$limit&format=php&serialize=0&disable_generic_filters=1");
- $visitors = $api->process();
-
- return $visitors;
- }
-
public function getUsersInLastXMin($minutes = 30) {
$api = new Piwik_API_Request("method=Live.getUsersInLastXMin&idSite=".$this->idSite."&minutes=".$minutes."&format=php&serialize=0&disable_generic_filters=1");
$visitors_halfhour = $api->process();