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
ca04b33a
Commit
ca04b33a
authored
13 years ago
by
Frank Karlitschek
Browse files
Options
Downloads
Patches
Plain Diff
first step on online ocs knowledgebase integration
parent
7de3ecfe
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
help/index.php
+3
-18
3 additions, 18 deletions
help/index.php
help/templates/index.php
+17
-1
17 additions, 1 deletion
help/templates/index.php
lib/ocsclient.php
+23
-0
23 additions, 0 deletions
lib/ocsclient.php
plugins/publiclink/plugin.xml
+0
-17
0 additions, 17 deletions
plugins/publiclink/plugin.xml
with
43 additions
and
36 deletions
help/index.php
+
3
−
18
View file @
ca04b33a
...
@@ -8,27 +8,12 @@ if( !OC_USER::isLoggedIn()){
...
@@ -8,27 +8,12 @@ if( !OC_USER::isLoggedIn()){
}
}
OC_APP
::
setActiveNavigationEntry
(
"help"
);
OC_APP
::
setActiveNavigationEntry
(
"help"
);
$settings
=
array
();
// Do the work ...
$kbe
=
OC_OCSCLIENT
::
getKnownledgebaseEntries
();
if
(
$_POST
[
"submit"
]
)
{
if
(
$_POST
[
"newpassword"
]
!=
$_POST
[
"newpasswordconfirm"
]
){
// Say "Passwords not equal"
}
else
{
if
(
OC_USER
::
checkPassword
(
$_SESSION
[
"username"
],
$_POST
[
"password"
]
)){
// Set password
OC_USER
::
setPassord
(
$_SESSION
[
"username"
],
$_POST
[
"newpassword"
]
);
}
else
{
// Say "old password bad"
}
}
}
$tmpl
=
new
OC_TEMPLATE
(
"help"
,
"index"
,
"user"
);
$tmpl
=
new
OC_TEMPLATE
(
"help"
,
"index"
,
"user"
);
$tmpl
->
assign
(
"
settings"
,
$settings
);
$tmpl
->
assign
(
"
kbe"
,
$kbe
);
$tmpl
->
printPage
();
$tmpl
->
printPage
();
?>
?>
This diff is collapsed.
Click to expand it.
help/templates/index.php
+
17
−
1
View file @
ca04b33a
This
is
self
-
explanatory
.
Why
are
you
here
?
<?php
/*
* Template for settings page
*/
?>
<h1>
Help
</h1>
<table
cellspacing=
"0"
>
<tbody>
<?php
foreach
(
$_
[
"kbe"
]
as
$kb
)
:
?>
<tr>
<td
width=
"1"
>
<?php
if
(
$kb
[
"preview"
]
<>
""
)
{
echo
(
'<a href="'
.
OC_HELPER
::
linkTo
(
"help"
,
"index.php"
)
.
'?id='
.
$kb
[
'id'
]
.
'"><img class="preview" border="0" src="'
.
$kb
[
"preview"
]
.
'" /></a>'
);
}
?>
</a></td>
<td
class=
"name"
><a
href=
"
<?php
echo
(
OC_HELPER
::
linkTo
(
"help"
,
"index.php"
)
.
'?id='
.
$kb
[
'id'
]);
?>
"
title=
""
>
<?php
echo
$kb
[
"name"
];
?>
</a><br
/>
<?php
echo
(
'<span class="type">'
.
$kb
[
'description'
]
.
'</span>'
);
?>
</td>
</tr>
<?php
endforeach
;
?>
</tbody>
</table>
This diff is collapsed.
Click to expand it.
lib/ocsclient.php
+
23
−
0
View file @
ca04b33a
...
@@ -114,6 +114,29 @@ class OC_OCSCLIENT{
...
@@ -114,6 +114,29 @@ class OC_OCSCLIENT{
return
$app
;
return
$app
;
}
}
/**
* @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
(){
$url
=
'http://api.opendesktop.org/v1/knowledgebase/data?page=0&pagesize=10'
;
$kbe
=
array
();
$xml
=
file_get_contents
(
$url
);
$data
=
simplexml_load_string
(
$xml
);
$tmp
=
$data
->
data
->
content
;
for
(
$i
=
0
;
$i
<
count
(
$tmp
);
$i
++
)
{
$kb
=
array
();
$kb
[
'id'
]
=
$tmp
[
$i
]
->
id
;
$kb
[
'name'
]
=
$tmp
[
$i
]
->
name
;
$kb
[
'description'
]
=
$tmp
[
$i
]
->
description
;
$kbe
[]
=
$kb
;
}
return
$kb
;
}
...
...
This diff is collapsed.
Click to expand it.
plugins/publiclink/plugin.xml
deleted
100755 → 0
+
0
−
17
View file @
7de3ecfe
<?xml version="1.0"?>
<plugin
version=
"1.0"
>
<info>
<id>
publiclink
</id>
<name>
Simple file sharing by creating a public link to a file
</name>
<version>
0.1
</version>
<licence>
AGPL
</licence>
<author>
Robin Appelman
</author>
<require>
1.1
</require>
</info>
<runtime>
<include>
lib_public.php
</include>
</runtime>
<install>
<database>
db_structure.xml
</database>
</install>
</plugin>
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