diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 10:42:37 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 10:42:37 +0200 |
commit | 82cbbb8ab8cfe81559c45905d7fca819d71df346 (patch) | |
tree | 947d58076dae8d5c4d0bd001ccebbe079448e057 /lib/ocsclient.php | |
parent | 1558cb860c2fb26fdde14fce2a16acbb29d12b3e (diff) | |
parent | 46f59b165e5bd1908509e8a62b67bf983cfd6224 (diff) | |
download | nextcloud-server-82cbbb8ab8cfe81559c45905d7fca819d71df346.tar.gz nextcloud-server-82cbbb8ab8cfe81559c45905d7fca819d71df346.zip |
Merge branch 'master' into encryption_improved_error_messages_4617
Conflicts:
apps/files/index.php
Diffstat (limited to 'lib/ocsclient.php')
-rw-r--r-- | lib/ocsclient.php | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/ocsclient.php b/lib/ocsclient.php index bd0302a2a81..58636f806be 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -40,16 +40,6 @@ class OC_OCSClient{ return($url); } - /** - * @brief Get the url of the OCS KB server. - * @returns string of the KB server - * 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() { - $url = OC_Config::getValue('knowledgebaseurl', 'http://api.apps.owncloud.com/v1'); - return($url); - } /** * @brief Get the content of an OCS url call. @@ -214,44 +204,5 @@ class OC_OCSClient{ } - /** - * @brief Get all the knowledgebase entries from the OCS server - * @returns array with q and a data - * - * This function returns a list of all the knowledgebase entries from the OCS server - */ - public static function getKnownledgebaseEntries($page, $pagesize, $search='') { - $kbe = array('totalitems' => 0); - if(OC_Config::getValue('knowledgebaseenabled', true)) { - $p = (int) $page; - $s = (int) $pagesize; - $searchcmd = ''; - if ($search) { - $searchcmd = '&search='.urlencode($search); - } - $url = OC_OCSClient::getKBURL().'/knowledgebase/data?type=150&page='. $p .'&pagesize='. $s . $searchcmd; - $xml = OC_OCSClient::getOCSresponse($url); - $data = @simplexml_load_string($xml); - if($data===false) { - OC_Log::write('core', 'Unable to parse knowledgebase content', OC_Log::FATAL); - return null; - } - $tmp = $data->data->content; - for($i = 0; $i < count($tmp); $i++) { - $kbe[] = array( - 'id' => $tmp[$i]->id, - 'name' => $tmp[$i]->name, - 'description' => $tmp[$i]->description, - 'answer' => $tmp[$i]->answer, - 'preview1' => $tmp[$i]->smallpreviewpic1, - 'detailpage' => $tmp[$i]->detailpage - ); - } - $kbe['totalitems'] = $data->meta->totalitems; - } - return $kbe; - } - - } |