Skip to content

NOW MANAGED ON CODEBERG

Fixed search system id clash

Dan Brown44347ee353ad
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