Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-10-09 17:00:36 +0400
committerMorris Jobke <hey@morrisjobke.de>2014-10-09 19:00:06 +0400
commitd6ee37856444c6b3d87533956290de3514f13dfe (patch)
treebf061f6fead585c821e230068ef0c3a5e59f95d7 /lib/private/app.php
parentf0c4347330befc5af5cd80720916afcd890f73a4 (diff)
Add support for keys in the info.xml
This allows to have links to different doc base URLs
Diffstat (limited to 'lib/private/app.php')
-rw-r--r--lib/private/app.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index 754d27c1849..700615348a0 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -659,7 +659,15 @@ class OC_App {
$data[$child->getName()] = substr($xml, 13, -14); //script <description> tags
} elseif ($child->getName() == 'documentation') {
foreach ($child as $subChild) {
- $data["documentation"][$subChild->getName()] = (string)$subChild;
+ $url = (string) $subChild;
+
+ // If it is not an absolute URL we assume it is a key
+ // i.e. admin-ldap will get converted to go.php?to=admin-ldap
+ if(!\OC::$server->getHTTPHelper()->isHTTPURL($url)) {
+ $url = OC_Helper::linkToDocs($url);
+ }
+
+ $data["documentation"][$subChild->getName()] = $url;
}
} else {
$data[$child->getName()] = (string)$child;