Skip to content

Commit

Permalink
Merge branch 'hotfix-es_date_download'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvanbreda committed Nov 21, 2019
2 parents f84435e + 6f7871b commit 7bab2dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
*
* @var string
*/
$config['version'] = '2.37.1';
$config['version'] = '2.37.2';

/**
* Version release date.
*
* @var string
*/
$config['release_date'] = '2019-11-11';
$config['release_date'] = '2019-11-21';

/**
* Link to the code repository downloads page.
Expand Down
6 changes: 6 additions & 0 deletions modules/rest_api/controllers/services/rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,10 @@ private function getEsPostData($scrollMode, $format) {
elseif (preg_match('/^\[media\]/', $field)) {
$fields[] = 'occurrence.associated_media';
}
elseif (preg_match('/^\[date string\]/', $field)) {
$fields[] = 'event.date_start';
$fields[] = 'event.date_end';
}
elseif (preg_match('/^\[null if zero\]\(field=([a-z_]+(\.[a-z_]+)*)\)$/', $field, $matches)) {
$fields[] = $matches[1];
}
Expand Down Expand Up @@ -1073,7 +1077,9 @@ private function proxyToEs($url) {
if ($httpCode !== 200) {
$error = curl_error($session);
kohana::log('error', 'ES proxy request failed: ' . $error . ': ' . json_encode($error));
kohana::log('error', 'URL: ' . $actualUrl);
kohana::log('error', 'Query: ' . $postData);
kohana::log('error', 'Response: ' . $response);
$this->apiResponse->fail('Internal server error', 500, json_encode($error));
}
curl_close($session);
Expand Down

0 comments on commit 7bab2dc

Please sign in to comment.