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

🚑 fix(objects) Fix a bug when an objectType has no mainAttr

Like auditEvent

issue #5135
parent 057e2f3f
......@@ -427,8 +427,12 @@ class objects
if (!isset($infos['searchAttributes'])) {
$searchAttrs = array();
$searchAttrs[$infos['mainAttr']] = $infos['aclCategory'].'/'.$infos['mainTab'];
$searchAttrs[$infos['nameAttr']] = $infos['aclCategory'].'/'.$infos['mainTab'];
if (!empty($infos['mainAttr'])) {
$searchAttrs[$infos['mainAttr']] = $infos['aclCategory'].'/'.$infos['mainTab'];
}
if (!empty($infos['nameAttr'])) {
$searchAttrs[$infos['nameAttr']] = $infos['aclCategory'].'/'.$infos['mainTab'];
}
foreach ($config->data['TABS'][$infos['tabGroup']] as $tab) {
if (!plugin_available($tab['CLASS'])) {
continue;
......
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