fix: [event:view] Correctly support the new `deleted` parameter behavior

pull/4666/head
mokaddem 2019-05-22 16:15:18 +02:00
parent 94332afbf6
commit b73ed846ab
1 changed files with 2 additions and 2 deletions

View File

@ -1057,7 +1057,7 @@ class EventsController extends AppController
$conditions['overrideLimit'] = 1;
}
if (isset($filters['deleted'])) {
$conditions['deleted'] = $filters['deleted'] == 2 ? 0 : 1;
$conditions['deleted'] = $filters['deleted'] == 2 ? 0 : [0, 1];
}
if (isset($filters['toIDS']) && $filters['toIDS'] != 0) {
$conditions['to_ids'] = $filters['toIDS'] == 2 ? 0 : 1;
@ -1509,7 +1509,7 @@ class EventsController extends AppController
$conditions['includeAttachments'] = true;
}
if (isset($this->params['named']['deleted'])) {
$conditions['deleted'] = $this->params['named']['deleted'] == 2 ? 0 : 1;
$conditions['deleted'] = $this->params['named']['deleted'] == 2 ? 0 : [0, 1];
}
if (isset($this->params['named']['toIDS']) && $this->params['named']['toIDS'] != 0) {
$conditions['to_ids'] = $this->params['named']['toIDS'] == 2 ? 0 : 1;