From: Dan Brown Date: Sun, 23 Apr 2017 19:27:49 +0000 (+0100) Subject: Fixed search system id clash X-Git-Tag: v0.16.0~1^2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/44347ee353ad9770f5d534c04cd3a54a17cb385f Fixed search system id clash --- diff --git a/app/Services/SearchService.php b/app/Services/SearchService.php index a3186e8f4..670c1545d 100644 --- a/app/Services/SearchService.php +++ b/app/Services/SearchService.php @@ -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 .'%'); diff --git a/version b/version index c7f762861..973dcf5ac 100644 --- a/version +++ b/version @@ -1 +1 @@ -v0.15-dev +v0.16-dev