Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
9da41200
Commit
9da41200
authored
Jun 05, 2013
by
Simon Green
Committed by
Byron Jones
Jun 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 879055: Add parenthesis to prevent anywordssubstr search from returning incorrect results.
r=glob, a=LpSolit
parent
5a316423
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Search.pm
Bugzilla/Search.pm
+5
-5
No files found.
Bugzilla/Search.pm
View file @
9da41200
...
@@ -2682,7 +2682,7 @@ sub _owner_idle_time_greater_less {
...
@@ -2682,7 +2682,7 @@ sub _owner_idle_time_greater_less {
"$ld_table.who IS NULL AND $act_table.who IS NULL"
;
"$ld_table.who IS NULL AND $act_table.who IS NULL"
;
}
else
{
}
else
{
$args
->
{
term
}
=
$args
->
{
term
}
=
"
$ld_table.who IS NOT NULL OR $act_table.who IS NOT NULL
"
;
"
($ld_table.who IS NOT NULL OR $act_table.who IS NOT NULL)
"
;
}
}
}
}
...
@@ -2926,14 +2926,14 @@ sub _anywordsubstr {
...
@@ -2926,14 +2926,14 @@ sub _anywordsubstr {
my
(
$self
,
$args
)
=
@_
;
my
(
$self
,
$args
)
=
@_
;
my
@terms
=
$self
->
_substring_terms
(
$args
);
my
@terms
=
$self
->
_substring_terms
(
$args
);
$args
->
{
term
}
=
join
(
"\n\tOR "
,
@terms
)
;
$args
->
{
term
}
=
'('
.
join
(
"\n\tOR "
,
@terms
)
.
')'
;
}
}
sub
_allwordssubstr
{
sub
_allwordssubstr
{
my
(
$self
,
$args
)
=
@_
;
my
(
$self
,
$args
)
=
@_
;
my
@terms
=
$self
->
_substring_terms
(
$args
);
my
@terms
=
$self
->
_substring_terms
(
$args
);
$args
->
{
term
}
=
join
(
"\n\tAND "
,
@terms
)
;
$args
->
{
term
}
=
'('
.
join
(
"\n\tAND "
,
@terms
)
.
')'
;
}
}
sub
_nowordssubstr
{
sub
_nowordssubstr
{
...
@@ -2950,14 +2950,14 @@ sub _anywords {
...
@@ -2950,14 +2950,14 @@ sub _anywords {
# Because _word_terms uses AND, we need to parenthesize its terms
# Because _word_terms uses AND, we need to parenthesize its terms
# if there are more than one.
# if there are more than one.
@terms
=
map
(
"($_)"
,
@terms
)
if
scalar
(
@terms
)
>
1
;
@terms
=
map
(
"($_)"
,
@terms
)
if
scalar
(
@terms
)
>
1
;
$args
->
{
term
}
=
join
(
"\n\tOR "
,
@terms
)
;
$args
->
{
term
}
=
'('
.
join
(
"\n\tOR "
,
@terms
)
.
')'
;
}
}
sub
_allwords
{
sub
_allwords
{
my
(
$self
,
$args
)
=
@_
;
my
(
$self
,
$args
)
=
@_
;
my
@terms
=
$self
->
_word_terms
(
$args
);
my
@terms
=
$self
->
_word_terms
(
$args
);
$args
->
{
term
}
=
join
(
"\n\tAND "
,
@terms
)
;
$args
->
{
term
}
=
'('
.
join
(
"\n\tAND "
,
@terms
)
.
')'
;
}
}
sub
_nowords
{
sub
_nowords
{
...
...
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