From 16cd74906501faf15946d2506037cba90cca7882 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 9 Oct 2014 15:00:36 +0200 Subject: [PATCH] Add support for keys in the info.xml This allows to have links to different doc base URLs a. --- apps/files/appinfo/info.xml | 3 +++ apps/files_encryption/appinfo/info.xml | 3 ++- apps/files_external/appinfo/info.xml | 3 +++ apps/files_trashbin/appinfo/info.xml | 3 +++ apps/files_versions/appinfo/info.xml | 3 +++ apps/user_ldap/appinfo/info.xml | 2 +- lib/private/app.php | 10 +++++++++- 7 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index 7f222c0cc7d..8586c6794f2 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -16,4 +16,7 @@ appinfo/remote.php appinfo/remote.php + + user-files + diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml index 62596087db8..6fcef693bed 100644 --- a/apps/files_encryption/appinfo/info.xml +++ b/apps/files_encryption/appinfo/info.xml @@ -11,7 +11,8 @@ 4 true - + user-encryption + admin-encryption false diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml index ee572561e7c..6acb58960d4 100644 --- a/apps/files_external/appinfo/info.xml +++ b/apps/files_external/appinfo/info.xml @@ -11,6 +11,9 @@ Robin Appelman, Michael Gapczynski, Vincent Petry 4.93 true + + admin-external-storage + diff --git a/apps/files_trashbin/appinfo/info.xml b/apps/files_trashbin/appinfo/info.xml index f15056908f1..8735b61e2db 100644 --- a/apps/files_trashbin/appinfo/info.xml +++ b/apps/files_trashbin/appinfo/info.xml @@ -15,5 +15,8 @@ To prevent a user from running out of disk space, the ownCloud Deleted files app + + user-trashbin + 166052 diff --git a/apps/files_versions/appinfo/info.xml b/apps/files_versions/appinfo/info.xml index 605ef5ccc37..9aed8069b9b 100644 --- a/apps/files_versions/appinfo/info.xml +++ b/apps/files_versions/appinfo/info.xml @@ -14,6 +14,9 @@ In addition to the expiry of versions, ownCloud’s versions app makes certain n + + user-versions + 166053 diff --git a/apps/user_ldap/appinfo/info.xml b/apps/user_ldap/appinfo/info.xml index 2b069d14e3d..a1a934f0140 100644 --- a/apps/user_ldap/appinfo/info.xml +++ b/apps/user_ldap/appinfo/info.xml @@ -15,7 +15,7 @@ A user logs into ownCloud with their LDAP or AD credentials, and is granted acce - http://doc.owncloud.org/server/7.0/go.php?to=admin-ldap + admin-ldap 166061 diff --git a/lib/private/app.php b/lib/private/app.php index 3eed9e3c443..1d406fb967e 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 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; -- 2.39.5