From 2bc273e2a8322eb084d8220a3cea51abdbbb3f7e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 2 Apr 2013 13:33:14 +0200 Subject: [PATCH] Consistently quote DataObject::$default_sort Strictly speaking, no longer required since we auto-quote simple field names in DataQuery now, but since the majority of sorts in core is already quoted we should stay consistent. --- tests/forms/gridfield/GridFieldDetailFormTest.php | 6 +++--- tests/model/DataObjectTest.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/forms/gridfield/GridFieldDetailFormTest.php b/tests/forms/gridfield/GridFieldDetailFormTest.php index ca3e87dbc..055badcda 100644 --- a/tests/forms/gridfield/GridFieldDetailFormTest.php +++ b/tests/forms/gridfield/GridFieldDetailFormTest.php @@ -242,7 +242,7 @@ class GridFieldDetailFormTest_Person extends DataObject implements TestOnly { ) ); - private static $default_sort = 'FirstName'; + private static $default_sort = '"FirstName"'; public function getCMSFields() { $fields = parent::getCMSFields(); @@ -266,7 +266,7 @@ class GridFieldDetailFormTest_PeopleGroup extends DataObject implements TestOnly 'People' => 'GridFieldDetailFormTest_Person' ); - private static $default_sort = 'Name'; + private static $default_sort = '"Name"'; public function getCMSFields() { $fields = parent::getCMSFields(); @@ -290,7 +290,7 @@ class GridFieldDetailFormTest_Category extends DataObject implements TestOnly { 'People' => 'GridFieldDetailFormTest_Person' ); - private static $default_sort = 'Name'; + private static $default_sort = '"Name"'; public function getCMSFields() { $fields = parent::getCMSFields(); diff --git a/tests/model/DataObjectTest.php b/tests/model/DataObjectTest.php index c651e64e9..aa8a45782 100644 --- a/tests/model/DataObjectTest.php +++ b/tests/model/DataObjectTest.php @@ -1161,7 +1161,7 @@ class DataObjectTest_Team extends DataObject implements TestOnly { ) ); - private static $default_sort = "Title"; + private static $default_sort = '"Title"'; public function MyTitle() { return 'Team ' . $this->Title;