]>
BookStack Code Mirror - bookstack/commitdiff
projects
/
bookstack
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
9e704fc
)
Fixed search system id clash
author
Dan Brown
<redacted>
Sun, 23 Apr 2017 19:27:49 +0000
(20:27 +0100)
committer
Dan Brown
<redacted>
Sun, 23 Apr 2017 19:27:49 +0000
(20:27 +0100)
app/Services/SearchService.php
patch
|
blob
|
history
version
patch
|
blob
|
history
diff --git
a/app/Services/SearchService.php
b/app/Services/SearchService.php
index a3186e8f4a38ceeb32d741b6803ab4699e621f8e..670c1545d263a1d9995d5f87fbede79616b7a5a1 100644
(file)
--- 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 c7f762861ccd51ccbe6920cdee90c1993d353988..973dcf5ace09ec3bce7c944761459a4785241871 100644
(file)
--- a/
version
+++ b/
version
@@
-1
+1
@@
-v0.1
5
-dev
+v0.1
6
-dev