summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-09-27 01:22:17 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-09-27 01:22:17 +0200
commit937a80c94129298ee80b4acbb07f95fc8b09728a (patch)
treedd4a686fe975e7cdea8849b6367f045e5ae2d939 /lib/private
parent3db3e65121e5908c7a5729dfef965a747da61cca (diff)
downloadnextcloud-server-937a80c94129298ee80b4acbb07f95fc8b09728a.tar.gz
nextcloud-server-937a80c94129298ee80b4acbb07f95fc8b09728a.zip
reduce nesting of the required app XML
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/legacy/app.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index cbbc9a46981..ea98348a471 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -174,9 +174,18 @@ class OC_App {
\OC::$server->getActivityManager()->registerProvider($provider);
}
}
- if (!empty($info['collaboration']['collaborators']['searchPlugins'])) {
- foreach ($info['collaboration']['collaborators']['searchPlugins'] as $plugin) {
- \OC::$server->getCollaboratorSearch()->registerPlugin($plugin);
+ if (!empty($info['collaboration']['plugins'])) {
+ // deal with one or many plugin entries
+ $plugins = isset($info['collaboration']['plugins']['plugin']['@value']) ?
+ [$info['collaboration']['plugins']['plugin']] : $info['collaboration']['plugins']['plugin'];
+ foreach ($plugins as $plugin) {
+ if($plugin['@attributes']['type'] === 'collaborator-search') {
+ $pluginInfo = [
+ 'shareType' => $plugin['@attributes']['shareType'],
+ 'class' => $plugin['@value'],
+ ];
+ \OC::$server->getCollaboratorSearch()->registerPlugin($pluginInfo);
+ }
}
}
}