mirror of https://github.com/MISP/MISP
fix: [sync] allow for both the minimal and searchminimal keywords to be used on the event index
- until now due to a bug only searchminimal was used - sync negotiation uses minimal as the key - this should greatly speed up the negotiation phasepull/5668/head
parent
d8afa98736
commit
aaafd95c74
|
@ -730,7 +730,7 @@ class EventsController extends AppController
|
|||
if (isset($this->paginate['conditions'])) {
|
||||
$rules['conditions'] = $this->paginate['conditions'];
|
||||
}
|
||||
if (!empty($passedArgs['searchminimal'])) {
|
||||
if (!empty($passedArgs['searchminimal']) || !empty($passedArgs['minimal'])) {
|
||||
unset($rules['contain']);
|
||||
$rules['recursive'] = -1;
|
||||
$rules['fields'] = array('id', 'timestamp', 'sighting_timestamp', 'published', 'uuid');
|
||||
|
@ -774,7 +774,7 @@ class EventsController extends AppController
|
|||
unset($events[$k]['SharingGroup']);
|
||||
}
|
||||
}
|
||||
if (empty($passedArgs['searchminimal'])) {
|
||||
if (empty($passedArgs['searchminimal']) && empty($passedArgs['minimal'])) {
|
||||
$passes = ceil($total_events / 1000);
|
||||
for ($i = 0; $i < $passes; $i++) {
|
||||
$event_tag_objects = array();
|
||||
|
|
Loading…
Reference in New Issue