Permalink
Browse files

BUGFIX Ensure that SearchForm searchEngine() call properly escapes th…

…e Relevance field for ANSI compliance

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113295 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 294f99d commit fe26454567af78a94183158537d97bbf0f3ed4ec @halkyon halkyon committed with sminnee Nov 1, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 search/SearchForm.php
View
@@ -126,7 +126,7 @@ public function getResults($pageLength = null, $data = null){
$start = isset($_GET['start']) ? (int)$_GET['start'] : 0;
if(strpos($keywords, '"') !== false || strpos($keywords, '+') !== false || strpos($keywords, '-') !== false || strpos($keywords, '*') !== false) {
- $results = DB::getConn()->searchEngine($this->classesToSearch, $keywords, $start, $pageLength, "Relevance DESC", "", true);
+ $results = DB::getConn()->searchEngine($this->classesToSearch, $keywords, $start, $pageLength, "\"Relevance\" DESC", "", true);
} else {
$results = DB::getConn()->searchEngine($this->classesToSearch, $keywords, $start, $pageLength);
}

0 comments on commit fe26454

Please sign in to comment.