diff options
author | Brice Maron <brice@bmaron.net> | 2012-06-14 21:16:59 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-06-14 21:16:59 +0000 |
commit | 4753cc3ebde9867ab4deb1979fb4231b0c847426 (patch) | |
tree | c6944e947bc84c8716b57b7e2b06ef51efccb3db /lib/ocsclient.php | |
parent | 6da5a2fdd4e8a19ab993b4a1f7de7e45b8922a16 (diff) | |
parent | f3b30e4658c4dde82b56b458c672fa5edcba5d6b (diff) | |
download | nextcloud-server-4753cc3ebde9867ab4deb1979fb4231b0c847426.tar.gz nextcloud-server-4753cc3ebde9867ab4deb1979fb4231b0c847426.zip |
Merge branch 'master' into multi_app_dir
Conflicts:
apps/bookmarks/ajax/addBookmark.php
config/config.sample.php
lib/app.php
remote.php
Diffstat (limited to 'lib/ocsclient.php')
-rw-r--r-- | lib/ocsclient.php | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lib/ocsclient.php b/lib/ocsclient.php index 33308553be0..2888569ad13 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -35,12 +35,7 @@ class OC_OCSClient{ * This function returns the url of the OCS AppStore server. It´s possible to set it in the config file or it will fallback to the default */ private static function getAppStoreURL(){ - $configurl=OC_Config::getValue('appstoreurl', ''); - if($configurl<>'') { - $url=$configurl; - }else{ - $url='http://api.apps.owncloud.com/v1'; - } + $url = OC_Config::getValue('appstoreurl', 'http://api.apps.owncloud.com/v1'); return($url); } @@ -50,12 +45,7 @@ class OC_OCSClient{ * This function returns the url of the OCS knowledge base server. It´s possible to set it in the config file or it will fallback to the default */ private static function getKBURL(){ - $configurl=OC_Config::getValue('knowledgebaseurl', ''); - if($configurl<>'') { - $url=$configurl; - }else{ - $url='http://api.apps.owncloud.com/v1'; - } + $url = OC_Config::getValue('knowledgebaseurl', 'http://api.apps.owncloud.com/v1'); return($url); } @@ -95,7 +85,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 +95,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){ |