mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
BUGFIX Ensure that Relevance field check in MSSQLDatabase::searchEngine() also checks for Relevance escaped in double quotes
This commit is contained in:
parent
7b6899b3f0
commit
9e1cdc8cfa
@ -1263,7 +1263,7 @@ class MSSQLDatabase extends SS_Database {
|
||||
public function searchEngine($classesToSearch, $keywords, $start, $pageLength, $sortBy = "Relevance DESC", $extraFilter = "", $booleanSearch = false, $alternativeFileFilter = "", $invertedMatch = false) {
|
||||
$results = new DataObjectSet();
|
||||
if(!$this->fullTextEnabled()) return $results;
|
||||
if (substr($sortBy, 0, 9)!='Relevance') user_error("Non-relevance sort not supported.", E_USER_ERROR);
|
||||
if (!in_array(substr($sortBy, 0, 9), array('"Relevanc', 'Relevance'))) user_error("Non-relevance sort not supported.", E_USER_ERROR);
|
||||
|
||||
$allClassesToSearch = array();
|
||||
foreach ($classesToSearch as $class) {
|
||||
|
Loading…
Reference in New Issue
Block a user