mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 17:05:37 +02:00
ENHANCEMENT Optionally filtering by new File.ShowInSearch flag in SQLite3Database->searcnEngine()
This commit is contained in:
parent
2e1dc517e6
commit
1b36c75f0a
@ -871,7 +871,13 @@ class SQLite3Database extends SS_Database {
|
||||
}
|
||||
|
||||
// Always ensure that only pages with ShowInSearch = 1 can be searched
|
||||
$extraFilters['SiteTree'] .= " AND ShowInSearch <> 0";
|
||||
$extraFilters['SiteTree'] .= ' AND ShowInSearch <> 0';
|
||||
// File.ShowInSearch was added later, keep the database driver backwards compatible
|
||||
// by checking for its existence first
|
||||
$fields = $this->fieldList('File');
|
||||
if(array_key_exists('ShowInSearch', $fields)) {
|
||||
$extraFilters['File'] .= " AND ShowInSearch <> 0";
|
||||
}
|
||||
|
||||
$limit = $start . ", " . (int) $pageLength;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user