API Update master to new major version for 4.0 compat

This commit is contained in:
Damian Mooyman 2015-10-16 11:17:24 +13:00
parent feb9676d7d
commit e76bd4b1a1
2 changed files with 5 additions and 7 deletions

View File

@ -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"

View File

@ -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"
}
}
}