Commit e30c2775 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5967-dashoard-crash-on-1-4-dev-when-all-plugins-installed' into '1.4-dev'

Resolve "Dashoard crash on 1.4-dev when all plugins installed"

See merge request fusiondirectory/fd!587
Showing with 7 additions and 5 deletions
+7 -5
......@@ -895,7 +895,7 @@ class config
if (isset($plInfo['plObjectType'])) {
$entry = ['CLASS' => $class,'NAME' => $plInfo['plShortName']];
if (isset($plInfo['plSubTabs'])) {
$entry['SUBTABS'] = strtoupper($plInfo['plSubTabs']).'TABS';
$entry['SUBTABS'] = strtoupper($plInfo['plSubTabs']);
}
foreach ($plInfo['plObjectType'] as $key => $value) {
if (is_numeric($key)) {
......
......@@ -1019,21 +1019,23 @@ class userinfo
if (is_array($type)) {
/* Used for recursion through subtabs */
$tabs = $type;
$prefix = '';
$tabs = $type;
} else {
/* Usual workflow */
$infos = objects::infos($type);
$prefix = $infos['aclCategory'].'/';
$tabs = $config->data['TABS'][$infos['tabGroup']];
}
foreach ($tabs as $tab) {
$acls = pluglist::pluginInfos($tab['CLASS'])['plProvidedAcls'];
if (isset($acls[$attribute])) {
return $infos['aclCategory'].'/'.$tab['CLASS'];
return $prefix.$tab['CLASS'];
}
if (isset($tab['SUBTABS'])) {
$acl = $this->getAttributeCategory($config->data['TABS'][$tab['SUBTABS']], $attribute);
if ($acl !== FALSE) {
return $acl;
return $prefix.$acl;
}
}
}
......
......@@ -29,7 +29,7 @@ class pluginsConfigInLdap extends multiPlugin
'plDescription' => _('Configuration for plugins'),
'plPriority' => 2,
'plObjectType' => ['configuration'],
'plSubTabs' => 'smallConfig',
'plSubTabs' => 'SMALLCONFIGTABS',
'plProvidedAcls' => []
];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment