fix: [restsearch] download as a first parameter should default to json

pull/4103/head
iglocska 2019-02-05 14:23:14 +01:00
parent ea515ee6f2
commit 890a0f1985
1 changed files with 5 additions and 2 deletions

View File

@ -3088,9 +3088,12 @@ class EventsController extends AppController
if ($user === false) {
return $exception;
}
if (!empty($filters['returnFormat'])) {
if (isset($filters['returnFormat'])) {
$returnFormat = $filters['returnFormat'];
} else if (empty($filters['returnFormat']) || $filters['returnFormat'] === 'download'){
} else {
$returnFormat = 'json';
}
if ($returnFormat === 'download') {
$returnFormat = 'json';
}
$elementCounter = 0;