mirror of https://github.com/MISP/MISP
chg: [events:index] Minimal searches returns events having event reports
and no attributespull/6412/head
parent
6aab30c871
commit
8087004922
|
@ -627,7 +627,14 @@ class EventsController extends AppController
|
|||
$v = $filterString;
|
||||
break;
|
||||
case 'minimal':
|
||||
$this->paginate['conditions']['AND'][] = array('NOT' => array('Event.attribute_count' => 0));
|
||||
$tableName = $this->Event->EventReport->table;
|
||||
$eventReportQuery = sprintf('EXISTS (SELECT id, deleted FROM %s WHERE %s.event_id = Event.id and %s.deleted = 0)', $tableName, $tableName, $tableName);
|
||||
$this->paginate['conditions']['AND'][] = [
|
||||
'OR' => [
|
||||
['NOT' => [ 'Event.attribute_count' => 0]],
|
||||
[$eventReportQuery]
|
||||
]
|
||||
];
|
||||
break;
|
||||
default:
|
||||
continue 2;
|
||||
|
|
Loading…
Reference in New Issue