Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
58e036e3
Commit
58e036e3
authored
11 years ago
by
Frank Karlitschek
Browse files
Options
Downloads
Patches
Plain Diff
remove knowledgebase calls that are no longer used in ownCloud 5/6
parent
92e90c8e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ocsclient.php
+0
-49
0 additions, 49 deletions
lib/ocsclient.php
with
0 additions
and
49 deletions
lib/ocsclient.php
+
0
−
49
View file @
58e036e3
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment