aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ocsclient.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-08-31 20:22:03 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-08-31 20:22:03 +0200
commit72e80bf6bd7c1dfe8e6b23787c2ba8d8add098c9 (patch)
tree3d451cf2cbc851bcc75e62f609c5694ab9d2feea /lib/ocsclient.php
parent6f8efcfe6162cd7fea68dd0677b7d4a6f1120c1f (diff)
downloadnextcloud-server-72e80bf6bd7c1dfe8e6b23787c2ba8d8add098c9.tar.gz
nextcloud-server-72e80bf6bd7c1dfe8e6b23787c2ba8d8add098c9.zip
send the current owncloud version to the ocs server so that we can filter for compatible apps
Diffstat (limited to 'lib/ocsclient.php')
-rw-r--r--lib/ocsclient.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index f05a9af31c2..dde2545858d 100644
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -88,7 +88,7 @@ class OC_OCSClient{
*
* This function returns a list of all the applications on the OCS server
*/
- public static function getApplications($categories,$page){
+ public static function getApplications($categories,$page,$filter){
if(OC_Config::getValue('appstoreenabled', true)==false){
return(array());
}
@@ -98,7 +98,10 @@ class OC_OCSClient{
}else{
$categoriesstring=$categories;
}
- $url=OC_OCSClient::getAppStoreURL().'/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page='.urlencode($page).'&pagesize=100';
+
+ $version='&version='.implode('x',\OC_Util::getVersion());
+ $filterurl='&filter='.urlencode($filter);
+ $url=OC_OCSClient::getAppStoreURL().'/content/data?categories='.urlencode($categoriesstring).'&sortmode=new&page='.urlencode($page).'&pagesize=100'.$filterurl.$version;
$apps=array();
$xml=@file_get_contents($url);
if($xml==FALSE){