From 5dc5e0b4c59c7654c2f4c6e0f74cea3f741459dc Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Fri, 5 Jul 2013 10:41:18 +1200 Subject: [PATCH] Quote table/column names when falling back to $fullName --- search/filters/SearchFilter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/search/filters/SearchFilter.php b/search/filters/SearchFilter.php index c647a3eab..5df64815f 100644 --- a/search/filters/SearchFilter.php +++ b/search/filters/SearchFilter.php @@ -183,7 +183,8 @@ abstract class SearchFilter extends Object { if($candidateClass == 'DataObject') { // fallback to the provided name in the event of a joined column // name (as the candidate class doesn't check joined records) - return $this->fullName; + $parts = explode('.', $this->fullName); + return '"' . implode('"."', $parts) . '"'; } return "\"$candidateClass\".\"$this->name\"";