From 729e8ea3e19d74092ba77244a5fc074b2007a73d Mon Sep 17 00:00:00 2001 From: Jeremy Roundill Date: Tue, 11 Nov 2014 19:44:06 +1300 Subject: [PATCH 1/3] Parsing fix for searching on DateFields --- admin/code/ModelAdmin.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/admin/code/ModelAdmin.php b/admin/code/ModelAdmin.php index aa4ae67d4..2f9f0cd72 100644 --- a/admin/code/ModelAdmin.php +++ b/admin/code/ModelAdmin.php @@ -227,6 +227,14 @@ abstract class ModelAdmin extends LeftAndMain { public function getList() { $context = $this->getSearchContext(); $params = $this->request->requestVar('q'); + + // Parse all DateFields to handle user input non ISO 8601 dates + foreach(singleton($this->modelClass)->getDefaultSearchContext()->getFields() as $field) { + if($field->Type() == "date text") { + $params[$field->getName()] = date('Y-m-d', strtotime($params[$field->getName()])); + } + } + $list = $context->getResults($params); $this->extend('updateList', $list); From 801574b9b0dd2dba228749b206b224aa26ed05fb Mon Sep 17 00:00:00 2001 From: jeffreyguo Date: Thu, 29 Sep 2016 13:21:17 +1300 Subject: [PATCH 2/3] Update index.md (#4020) MINOR: wording correction --- docs/en/02_Developer_Guides/05_Extending/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/02_Developer_Guides/05_Extending/index.md b/docs/en/02_Developer_Guides/05_Extending/index.md index 6cb8ba481..b038475e9 100644 --- a/docs/en/02_Developer_Guides/05_Extending/index.md +++ b/docs/en/02_Developer_Guides/05_Extending/index.md @@ -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"] \ No newline at end of file +[CHILDREN Folder="How_Tos"] From ae4108bf00e9503c5748c4129df7e1c3ea8c8b5f Mon Sep 17 00:00:00 2001 From: Anton Smith Date: Thu, 29 Sep 2016 13:25:14 +1300 Subject: [PATCH 3/3] BUG Content-Disposition header breaks in Firefox (#4087) --- control/HTTPRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/control/HTTPRequest.php b/control/HTTPRequest.php index 3de2a3668..81b4ab9f2 100644 --- a/control/HTTPRequest.php +++ b/control/HTTPRequest.php @@ -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;