Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
279acbb0
Commit
279acbb0
authored
Oct 18, 2019
by
Dominik Hebeler
Browse files
fixed a bug in the new phrase search
parent
64f791ad
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
app/MetaGer.php
View file @
279acbb0
...
...
@@ -566,7 +566,7 @@ class MetaGer
$filter
=
rtrim
(
$filter
,
","
);
$error
=
trans
(
'metaGer.engines.noSpecialSearch'
,
[
'fokus'
=>
trans
(
$this
->
sumaFile
->
foki
->
{
$this
->
fokus
}
->
{
"display-name"
}),
'filter'
=>
$filter
'filter'
=>
$filter
,
]);
$this
->
errors
[]
=
$error
;
}
...
...
@@ -1227,14 +1227,14 @@ class MetaGer
// matches '[... ]-test[ ...]'
$words
=
preg_split
(
"/\s+/si"
,
$tmp
);
$newQ
=
""
;
$newQ
=
$this
->
q
;
foreach
(
$words
as
$word
)
{
if
(
strpos
(
$word
,
"-"
)
===
0
&&
strlen
(
$word
)
>
1
)
{
$this
->
stopWords
[]
=
substr
(
$word
,
1
);
}
else
{
$newQ
.
=
" "
.
$word
;
$newQ
=
str_ireplace
(
$word
,
""
,
$newQ
);
}
}
$newQ
=
preg_replace
(
"/(\s)\s+/"
,
"$1"
,
$newQ
);
$this
->
q
=
trim
(
$newQ
);
# Overwrite Setting if submitted via Parameter
if
(
$request
->
has
(
'stop'
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment