support searching the knowledge base
This commit is contained in:
parent
c3cb000cb2
commit
0f5864d864
|
@ -199,7 +199,7 @@ class OC_OCSClient{
|
||||||
*
|
*
|
||||||
* This function returns a list of all the knowledgebase entries from the OCS server
|
* 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){
|
if(OC_Config::getValue('knowledgebaseenabled', true)==false){
|
||||||
$kbe=array();
|
$kbe=array();
|
||||||
$kbe['totalitems']=0;
|
$kbe['totalitems']=0;
|
||||||
|
@ -208,7 +208,8 @@ class OC_OCSClient{
|
||||||
|
|
||||||
$p= (int) $page;
|
$p= (int) $page;
|
||||||
$s= (int) $pagesize;
|
$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();
|
$kbe=array();
|
||||||
$xml=@file_get_contents($url);
|
$xml=@file_get_contents($url);
|
||||||
|
|
Loading…
Reference in New Issue