mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '3.4' into 3
This commit is contained in:
commit
5e9d16646d
@ -215,6 +215,13 @@ abstract class ModelAdmin extends LeftAndMain {
|
|||||||
$params = ArrayLib::array_map_recursive('trim', $params);
|
$params = ArrayLib::array_map_recursive('trim', $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parse all DateFields to handle user input non ISO 8601 dates
|
||||||
|
foreach($context->getFields() as $field) {
|
||||||
|
if($field instanceof DatetimeField) {
|
||||||
|
$params[$field->getName()] = date('Y-m-d', strtotime($params[$field->getName()]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$list = $context->getResults($params);
|
$list = $context->getResults($params);
|
||||||
|
|
||||||
$this->extend('updateList', $list);
|
$this->extend('updateList', $list);
|
||||||
|
@ -397,7 +397,7 @@ class SS_HTTPRequest implements ArrayAccess {
|
|||||||
$response = new SS_HTTPResponse($fileData);
|
$response = new SS_HTTPResponse($fileData);
|
||||||
$response->addHeader("Content-Type", "$mimeType; name=\"" . addslashes($fileName) . "\"");
|
$response->addHeader("Content-Type", "$mimeType; name=\"" . addslashes($fileName) . "\"");
|
||||||
// Note a IE-only fix that inspects this header in HTTP::add_cache_headers().
|
// Note a IE-only fix that inspects this header in HTTP::add_cache_headers().
|
||||||
$response->addHeader("Content-Disposition", "attachment; filename=" . addslashes($fileName));
|
$response->addHeader("Content-Disposition", "attachment; filename=\"" . addslashes($fileName) . "\"");
|
||||||
$response->addHeader("Content-Length", strlen($fileData));
|
$response->addHeader("Content-Length", strlen($fileData));
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
Loading…
Reference in New Issue
Block a user