diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2012-04-20 21:49:57 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2012-04-20 21:49:57 +0200 |
commit | 0f5864d864f63a7142064d142661c46644b2d0db (patch) | |
tree | a8d3aad694840273c9efcf406b71beeec539db67 /lib/ocsclient.php | |
parent | c3cb000cb23ef9e17f0443b16f2291a0a885126c (diff) | |
download | nextcloud-server-0f5864d864f63a7142064d142661c46644b2d0db.tar.gz nextcloud-server-0f5864d864f63a7142064d142661c46644b2d0db.zip |
support searching the knowledge base
Diffstat (limited to 'lib/ocsclient.php')
-rwxr-xr-x | lib/ocsclient.php | 5 |
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); |