aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblizzz <blizzz@owncloud.com>2013-09-02 14:24:46 -0700
committerblizzz <blizzz@owncloud.com>2013-09-02 14:24:46 -0700
commit431cf06e996dad7af99b4c65678e5793bd682850 (patch)
tree59da6854ee5a08073d52d3a71c3246cddd86782e
parentf81a205f123a9c7b5204c1de41d3c1737923dc99 (diff)
parenta5633bb155e348bd0fce9ea703511de86308fab6 (diff)
downloadnextcloud-server-431cf06e996dad7af99b4c65678e5793bd682850.tar.gz
nextcloud-server-431cf06e996dad7af99b4c65678e5793bd682850.zip
Merge pull request #4672 from owncloud/ocs_cleanup
Ocs cleanup
-rw-r--r--config/config.sample.php3
-rw-r--r--lib/ocsclient.php49
2 files changed, 0 insertions, 52 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 51ef60588d6..0afad880c17 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -71,9 +71,6 @@ $CONFIG = array(
/* Enable the help menu item in the settings */
"knowledgebaseenabled" => true,
-/* URL to use for the help page, server should understand OCS */
-"knowledgebaseurl" => "http://api.apps.owncloud.com/v1",
-
/* Enable installing apps from the appstore */
"appstoreenabled" => true,
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;
- }
-
-
}