Fixed search system id clash

This commit is contained in:
Dan Brown 2017-04-23 20:27:49 +01:00
parent 9e704fcae4
commit 44347ee353
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 2 additions and 1 deletions

View File

@ -154,6 +154,7 @@ class SearchService
// Handle normal search terms
if (count($terms['search']) > 0) {
$subQuery = $this->db->table('search_terms')->select('entity_id', 'entity_type', \DB::raw('SUM(score) as score'));
$subQuery->where('entity_type', '=', 'BookStack\\' . ucfirst($entityType));
$subQuery->where(function(Builder $query) use ($terms) {
foreach ($terms['search'] as $inputTerm) {
$query->orWhere('term', 'like', $inputTerm .'%');

View File

@ -1 +1 @@
v0.15-dev
v0.16-dev