Commit 839e26b5 authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '6083-improve-objectsattribute' into '1.4-dev'

Resolve "Improve ObjectsAttribute"

See merge request fusiondirectory/fd!763
parents 3cafc99e 55f681fd
......@@ -46,7 +46,7 @@ class ObjectsAttribute extends GenericDialogAttribute
$attributes[$display_attr] = '*';
}
$specialAttributes = array_intersect([$store_attr,$display_attr], ['nameAttr','mainAttr']);
foreach ($objectTypes as $type) {
foreach ($objectTypes as $i => $type) {
try {
if (!empty($specialAttributes)) {
$infos = objects::infos($type);
......@@ -61,10 +61,10 @@ class ObjectsAttribute extends GenericDialogAttribute
}
}
} catch (NonExistingObjectTypeException $e) {
continue;
unset($objectTypes[$i]);
}
}
$this->selectManagementParameters = [$objectTypes,TRUE,$attributes];
$this->selectManagementParameters = [array_values($objectTypes),TRUE,$attributes];
$this->filterElementDefinitions = $filterElementDefinitions;
}
......
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