summaryrefslogtreecommitdiffstats
path: root/lib/ocsclient.php
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2011-08-17 00:24:50 +0200
committerFrank Karlitschek <karlitschek@kde.org>2011-08-17 00:24:50 +0200
commitcb9fc6d901c59999f3ebd369449e4a845680665d (patch)
treed142cc1a9256225498fecdd56386c870777f69e8 /lib/ocsclient.php
parent9f28c20660e113c501a951262765ce9c9c4d0e84 (diff)
downloadnextcloud-server-cb9fc6d901c59999f3ebd369449e4a845680665d.tar.gz
nextcloud-server-cb9fc6d901c59999f3ebd369449e4a845680665d.zip
make the help section working and pretty. knowledge base entries are fetched via OCS from a different server. cool stuff
Diffstat (limited to 'lib/ocsclient.php')
-rw-r--r--lib/ocsclient.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/ocsclient.php b/lib/ocsclient.php
index 1df9e21e606..4b71f4550e5 100644
--- a/lib/ocsclient.php
+++ b/lib/ocsclient.php
@@ -134,8 +134,10 @@ class OC_OCSClient{
*
* This function returns a list of all the knowledgebase entries from the OCS server
*/
- public static function getKnownledgebaseEntries(){
- $url='http://api.apps.owncloud.com/v1/knowledgebase/data?type=150&page=0&pagesize=10';
+ public static function getKnownledgebaseEntries($page,$pagesize){
+ $p= (int) $page;
+ $s= (int) $pagesize;
+ $url='http://api.apps.owncloud.com/v1/knowledgebase/data?type=150&page='.$p.'&pagesize='.$s;
$kbe=array();
$xml=@file_get_contents($url);
@@ -152,9 +154,12 @@ class OC_OCSClient{
$kb['description']=$tmp[$i]->description;
$kb['answer']=$tmp[$i]->answer;
$kb['preview1']=$tmp[$i]->smallpreviewpic1;
+ $kb['detailpage']=$tmp[$i]->detailpage;
$kbe[]=$kb;
}
- return $kbe;
+ $total=$data->meta->totalitems;
+ $kbe['totalitems']=$total;
+ return $kbe;
}