chg: [events] Enables index search for object. Fix #6961

pull/7024/head
mokaddem 2021-02-15 15:17:00 +01:00
parent 37a724ddf3
commit d54afd12d6
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 3 additions and 0 deletions

View File

@ -1741,6 +1741,9 @@ class EventsController extends AppController
// search for all attributes in object
foreach ($event['Object'] as $k => $object) {
if ($this->__valueInFieldAttribute($object, ['id', 'uuid', 'name', 'comment'], $searchFor)) {
continue;
}
foreach ($object['Attribute'] as $k2 => $attribute) {
if (!$this->__valueInFieldAttribute($attribute, $filterValue, $searchFor)) {
unset($event['Object'][$k]['Attribute'][$k2]);