Bug 760075: Fix error thrown when an allwords search starts with or ends with a space

r=glob, a=LpSolit


git-svn-id: svn://10.0.0.236/trunk@263920 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2012-06-08 07:15:52 +00:00
parent e12e542966
commit b2c1107266
2 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
8258
8259

View File

@ -2515,6 +2515,7 @@ sub _multiselect_multiple {
my @terms;
foreach my $word (@words) {
next if $word eq '';
$args->{value} = $word;
$args->{quoted} = $dbh->quote($word);
push(@terms, $self->_multiselect_term($args));
@ -2682,15 +2683,14 @@ sub _anyexact {
sub _anywordsubstr {
my ($self, $args) = @_;
my ($full_field, $value) = @$args{qw(full_field value)};
my @terms = $self->_substring_terms($args);
$args->{term} = join("\n\tOR ", @terms);
}
sub _allwordssubstr {
my ($self, $args) = @_;
my @terms = $self->_substring_terms($args);
$args->{term} = join("\n\tAND ", @terms);
}