Merge branch '3.4' into 3

This commit is contained in:
Daniel Hensby 2016-10-03 10:24:32 +01:00
commit 5e9d16646d
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
2 changed files with 8 additions and 1 deletions

View File

@ -215,6 +215,13 @@ abstract class ModelAdmin extends LeftAndMain {
$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);
$this->extend('updateList', $list);

View File

@ -397,7 +397,7 @@ class SS_HTTPRequest implements ArrayAccess {
$response = new SS_HTTPResponse($fileData);
$response->addHeader("Content-Type", "$mimeType; name=\"" . addslashes($fileName) . "\"");
// 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));
return $response;