Commit 2c3865c5 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5967-systems-dashboard-crashes' into '1.3-fixes'

Resolve "Systems dashboard crashes"

See merge request fusiondirectory/fd!589
parents 30d4bf3c fffcd35b
......@@ -803,7 +803,7 @@ class config
if (isset($plInfo['plObjectType'])) {
$entry = array('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)) {
......
......@@ -1029,21 +1029,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' => 20,
'plObjectType' => array('configuration'),
'plSubTabs' => 'smallConfig',
'plSubTabs' => 'SMALLCONFIGTABS',
'plProvidedAcls' => array()
);
......
Markdown is supported
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