Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2017-04-23 20:27:49 +0100
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
44347ee353ad9770f5d534c04cd3a54a17cb385f
44347ee3
1 parent
9e704fca
Fixed search system id clash
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
app/Services/SearchService.php
version
app/Services/SearchService.php
View file @
44347ee
...
...
@@ -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
.
'%'
);
...
...
version
View file @
44347ee
v0.1
5
-dev
v0.1
6
-dev
...
...
Please
register
or
sign in
to post a comment