From 2f3c05307370dbf32e986fecab4743814c58333c Mon Sep 17 00:00:00 2001
From: mattpiwik <matthieu.aubry@gmail.com>
Date: Mon, 21 Feb 2011 08:12:14 +0000
Subject: [PATCH] Fixes #2100

git-svn-id: http://dev.piwik.org/svn/trunk@3955 59fd770c-687e-43c8-a1e3-f5a4ff64c105
---
 config/global.ini.php             | 3 +++
 plugins/MultiSites/Controller.php | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/config/global.ini.php b/config/global.ini.php
index 3065a7d22b..6d447a11a8 100644
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -81,6 +81,9 @@ site_selector_max_sites = 10
 ; if set to 1, shows sparklines (evolution graph) in 'All Websites' report (MultiSites plugin)
 show_multisites_sparklines = 1
 
+; number of websites to display per page in the All Websites dashboard
+all_websites_website_per_page = 50
+
 ; if set to 0, the anonymous user will not be able to use the 'segments' parameter in the API request
 ; this is useful to prevent full DB access to the anonymous user, or to limit performance usage
 anonymous_user_enable_use_segments_API = 1
diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php
index 63e351c7b5..8bd6f87360 100644
--- a/plugins/MultiSites/Controller.php
+++ b/plugins/MultiSites/Controller.php
@@ -21,11 +21,17 @@ class Piwik_MultiSites_Controller extends Piwik_Controller
 	protected $evolutionBy = 'visits';
 	protected $mySites = array();
 	protected $page = 1;
-	protected $limit = 20;
+	protected $limit = 0;
 	protected $period;
 	protected $date;
 	protected $dateToStr;
 
+	function __construct()
+	{
+		parent::__construct();
+		
+		$this->limit = Zend_Registry::get('config')->General->all_websites_website_per_page;
+	}
 
 	function index()
 	{
-- 
GitLab