diff options
-rw-r--r-- | lib/private/legacy/app.php | 15 |
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); + } } } } |