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 phase
pull/5668/head
iglocska 2020-02-25 16:48:05 +01:00
parent d8afa98736
commit aaafd95c74
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 2 deletions

View File

@ -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();