mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
API Update master to new major version for 4.0 compat
This commit is contained in:
parent
feb9676d7d
commit
e76bd4b1a1
@ -257,13 +257,13 @@ class SQLite3Database extends SS_Database {
|
||||
(Title LIKE '%$keywords%' OR MenuTitle LIKE '%$keywords%' OR Content LIKE '%$keywords%' OR MetaDescription LIKE '%$keywords%' OR
|
||||
Title LIKE '%$htmlEntityKeywords%' OR MenuTitle LIKE '%$htmlEntityKeywords%' OR Content LIKE '%$htmlEntityKeywords%' OR MetaDescription LIKE '%$htmlEntityKeywords%')
|
||||
";
|
||||
$match['File'] = "(Filename LIKE '%$keywords%' OR Title LIKE '%$keywords%' OR Content LIKE '%$keywords%') AND ClassName = 'File'";
|
||||
$match['File'] = "(Name LIKE '%$keywords%' OR Title LIKE '%$keywords%') AND ClassName = 'File'";
|
||||
|
||||
// We make the relevance search by converting a boolean mode search into a normal one
|
||||
$relevanceKeywords = $keywords;
|
||||
$htmlEntityRelevanceKeywords = $htmlEntityKeywords;
|
||||
$relevance['SiteTree'] = "(Title LIKE '%$relevanceKeywords%' OR MenuTitle LIKE '%$relevanceKeywords%' OR Content LIKE '%$relevanceKeywords%' OR MetaDescription LIKE '%$relevanceKeywords%') + (Title LIKE '%$htmlEntityRelevanceKeywords%' OR MenuTitle LIKE '%$htmlEntityRelevanceKeywords%' OR Content LIKE '%$htmlEntityRelevanceKeywords%' OR MetaDescription LIKE '%$htmlEntityRelevanceKeywords%')";
|
||||
$relevance['File'] = "(Filename LIKE '%$relevanceKeywords%' OR Title LIKE '%$relevanceKeywords%' OR Content LIKE '%$relevanceKeywords%')";
|
||||
$relevance['File'] = "(Name LIKE '%$relevanceKeywords%' OR Title LIKE '%$relevanceKeywords%')";
|
||||
} else {
|
||||
$relevance['SiteTree'] = $relevance['File'] = 1;
|
||||
$match['SiteTree'] = $match['File'] = "1 = 1";
|
||||
@ -289,7 +289,6 @@ class SQLite3Database extends SS_Database {
|
||||
"\"Content\"",
|
||||
"\"LastEdited\"",
|
||||
"\"Created\"",
|
||||
"NULL AS \"Filename\"",
|
||||
"NULL AS \"Name\"",
|
||||
"\"CanViewType\"",
|
||||
"$relevance[SiteTree] AS Relevance"
|
||||
@ -300,10 +299,9 @@ class SQLite3Database extends SS_Database {
|
||||
"NULL AS \"ParentID\"",
|
||||
"\"Title\"",
|
||||
"NULL AS \"URLSegment\"",
|
||||
"\"Content\"",
|
||||
"NULL AS \"Content\"",
|
||||
"\"LastEdited\"",
|
||||
"\"Created\"",
|
||||
"\"Filename\"",
|
||||
"\"Name\"",
|
||||
"NULL AS \"CanViewType\"",
|
||||
"$relevance[File] AS Relevance"
|
||||
|
@ -14,11 +14,11 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"silverstripe/framework": ">=3.2"
|
||||
"silverstripe/framework": "~4.0"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.4.x-dev"
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user