From 689c8f5f0926a58b57146562c23b0a63de2d9747 Mon Sep 17 00:00:00 2001
From: Frank Karlitschek <frank@owncloud.org>
Date: Sat, 9 Jun 2012 22:02:29 +0200
Subject: [PATCH] paging not yet implemented. increasing pagesize to 100 as a
 temporary quickfix

---
 lib/ocsclient.php | 4 ++--
 settings/apps.php | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index aef51f38fb..d0d27263ba 100644
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -95,7 +95,7 @@ class OC_OCSClient{
 	 *
 	 * This function returns a list of all the applications on the OCS server
 	 */
-	public static function getApplications($categories){
+	public static function getApplications($categories,$page){
 		if(OC_Config::getValue('appstoreenabled', true)==false){
 			return(array());
 		}
@@ -105,7 +105,7 @@ class OC_OCSClient{
 		}else{
 			$categoriesstring=$categories;
 		}
-		$url=OC_OCSClient::getAppStoreURL().'/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page=0&pagesize=10';
+		$url=OC_OCSClient::getAppStoreURL().'/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page='.urlencode($page).'&pagesize=100';
 		$apps=array();
 		$xml=@file_get_contents($url);
 		if($xml==FALSE){
diff --git a/settings/apps.php b/settings/apps.php
index 028f00c249..341d9381dc 100644
--- a/settings/apps.php
+++ b/settings/apps.php
@@ -63,7 +63,8 @@ usort($apps, 'app_sort');
  $catagoryNames=OC_OCSClient::getCategories();
  if(is_array($catagoryNames)){
  	$categories=array_keys($catagoryNames);
- 	$externalApps=OC_OCSClient::getApplications($categories);
+	$page=0;
+ 	$externalApps=OC_OCSClient::getApplications($categories,$page);
  	foreach($externalApps as $app){
 		// show only external apps that are not exist yet
 		$local=false;
-- 
GitLab