Merge branch '3'

This commit is contained in:
Daniel Hensby 2016-10-03 11:53:26 +01:00
commit 45736ef2db
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
3 changed files with 11 additions and 3 deletions

View File

@ -439,7 +439,7 @@ class HTTPRequest implements ArrayAccess {
$response = new 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;

View File

@ -17,6 +17,7 @@ use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\FileField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DatetimeField;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
use SilverStripe\Forms\GridField\GridFieldPrintButton;
@ -247,6 +248,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

@ -7,11 +7,11 @@ includes common functionality and default behaviors easily complemented with add
themes.
SilverStripe includes a myriad of extension API's such as *Extension Hooks* and support for programming patterns
such Dependency Injection. Allowing developers to tailor the framework to their needs without modifying the core
such as *Dependency Injection*. Allowing developers to tailor the framework to their needs without modifying the core
framework.
[CHILDREN Exclude="How_Tos"]
## How to's
[CHILDREN Folder="How_Tos"]
[CHILDREN Folder="How_Tos"]