reduce nesting of the required app XML
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
3db3e65121
commit
937a80c941
1 changed files with 12 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue