chg: [WIP] added function meant to resolve id vs uuid issues for the UI attribute search

- still needs some love
pull/3966/head
iglocska 2018-12-18 09:46:02 +01:00
parent b1db12d242
commit ba3ae0094c
1 changed files with 14 additions and 0 deletions

View File

@ -2213,6 +2213,20 @@ class Event extends AppModel
return $conditions;
}
public function set_filter_mixed_id(&$params, $conditions, $options)
{
if (!empty($params['mixed_id'])) {
$params['mixed_id'] = $this->convert_filters($params['mixed_id']);
if (!empty($options['scope']) || $options['scope'] === 'Event') {
$conditions = $this->generic_add_filter($conditions, $params['uuid'], 'Event.uuid');
}
if (!empty($options['scope']) || $options['scope'] === 'Attribute') {
$conditions = $this->generic_add_filter($conditions, $params['uuid'], 'Attribute.uuid');
}
}
return $conditions;
}
public function set_filter_deleted(&$params, $conditions, $options)
{
if (!empty($params['deleted'])) {