paging not yet implemented. increasing pagesize to 100 as a temporary quickfix
This commit is contained in:
parent
061938cbb5
commit
689c8f5f09
|
@ -95,7 +95,7 @@ class OC_OCSClient{
|
||||||
*
|
*
|
||||||
* This function returns a list of all the applications on the OCS server
|
* 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){
|
if(OC_Config::getValue('appstoreenabled', true)==false){
|
||||||
return(array());
|
return(array());
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ class OC_OCSClient{
|
||||||
}else{
|
}else{
|
||||||
$categoriesstring=$categories;
|
$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();
|
$apps=array();
|
||||||
$xml=@file_get_contents($url);
|
$xml=@file_get_contents($url);
|
||||||
if($xml==FALSE){
|
if($xml==FALSE){
|
||||||
|
|
|
@ -63,7 +63,8 @@ usort($apps, 'app_sort');
|
||||||
$catagoryNames=OC_OCSClient::getCategories();
|
$catagoryNames=OC_OCSClient::getCategories();
|
||||||
if(is_array($catagoryNames)){
|
if(is_array($catagoryNames)){
|
||||||
$categories=array_keys($catagoryNames);
|
$categories=array_keys($catagoryNames);
|
||||||
$externalApps=OC_OCSClient::getApplications($categories);
|
$page=0;
|
||||||
|
$externalApps=OC_OCSClient::getApplications($categories,$page);
|
||||||
foreach($externalApps as $app){
|
foreach($externalApps as $app){
|
||||||
// show only external apps that are not exist yet
|
// show only external apps that are not exist yet
|
||||||
$local=false;
|
$local=false;
|
||||||
|
|
Loading…
Reference in New Issue