summaryrefslogtreecommitdiffstats
path: root/lib/ocsclient.php
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2012-04-20 21:49:57 +0200
committerFrank Karlitschek <karlitschek@kde.org>2012-04-20 21:49:57 +0200
commit0f5864d864f63a7142064d142661c46644b2d0db (patch)
treea8d3aad694840273c9efcf406b71beeec539db67 /lib/ocsclient.php
parentc3cb000cb23ef9e17f0443b16f2291a0a885126c (diff)
downloadnextcloud-server-0f5864d864f63a7142064d142661c46644b2d0db.tar.gz
nextcloud-server-0f5864d864f63a7142064d142661c46644b2d0db.zip
support searching the knowledge base
Diffstat (limited to 'lib/ocsclient.php')
-rwxr-xr-xlib/ocsclient.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index d830a4f3e7e..9ad9ef21c66 100755
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -199,7 +199,7 @@ class OC_OCSClient{
*
* This function returns a list of all the knowledgebase entries from the OCS server
*/
- public static function getKnownledgebaseEntries($page,$pagesize){
+ public static function getKnownledgebaseEntries($page,$pagesize,$search=''){
if(OC_Config::getValue('knowledgebaseenabled', true)==false){
$kbe=array();
$kbe['totalitems']=0;
@@ -208,7 +208,8 @@ class OC_OCSClient{
$p= (int) $page;
$s= (int) $pagesize;
- $url=OC_OCSClient::getKBURL().'/knowledgebase/data?type=150&page='.$p.'&pagesize='.$s;
+ if($search<>'') $searchcmd='&search='.urlencode($search); else $searchcmd='';
+ $url=OC_OCSClient::getKBURL().'/knowledgebase/data?type=150&page='.$p.'&pagesize='.$s.$searchcmd;
$kbe=array();
$xml=@file_get_contents($url);