summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2013-06-07 07:29:47 +0200
committerByron Jones <bjones@mozilla.com>2013-06-07 07:29:47 +0200
commit3dceb822ce0d97785356719ba395fbcf29dd8ba0 (patch)
tree6e5f1101c3d047bc35fd4bf61664e757c2ea222a /Bugzilla
parentb1bec9c8e4f196fd0b4e10f76053d6ebbcb5e234 (diff)
downloadbugzilla-3dceb822ce0d97785356719ba395fbcf29dd8ba0.tar.gz
bugzilla-3dceb822ce0d97785356719ba395fbcf29dd8ba0.tar.xz
Bug 880315: Fix malformed sql generated by the fix for bug 879055
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Search.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index d393a9918..f19497454 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -2944,14 +2944,14 @@ sub _anywordsubstr {
my ($self, $args) = @_;
my @terms = $self->_substring_terms($args);
- $args->{term} = '(' . join("\n\tOR ", @terms) . ')';
+ $args->{term} = @terms ? '(' . join("\n\tOR ", @terms) . ')' : '';
}
sub _allwordssubstr {
my ($self, $args) = @_;
my @terms = $self->_substring_terms($args);
- $args->{term} = '(' . join("\n\tAND ", @terms) . ')';
+ $args->{term} = @terms ? '(' . join("\n\tAND ", @terms) . ')' : '';
}
sub _nowordssubstr {
@@ -2968,14 +2968,14 @@ sub _anywords {
# Because _word_terms uses AND, we need to parenthesize its terms
# if there are more than one.
@terms = map("($_)", @terms) if scalar(@terms) > 1;
- $args->{term} = '(' . join("\n\tOR ", @terms) . ')';
+ $args->{term} = @terms ? '(' . join("\n\tOR ", @terms) . ')' : '';
}
sub _allwords {
my ($self, $args) = @_;
my @terms = $self->_word_terms($args);
- $args->{term} = '(' . join("\n\tAND ", @terms) . ')';
+ $args->{term} = @terms ? '(' . join("\n\tAND ", @terms) . ')' : '';
}
sub _nowords {