From: terry%netscape.com <> Date: Wed, 20 Jan 1999 01:17:21 +0000 (+0000) Subject: Wasn't properly stripping out null queries on text searches. X-Git-Tag: bugzilla-2.2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7613f7b0a655bf363ea80e511fe4f8364366a94f;p=thirdparty%2Fbugzilla.git Wasn't properly stripping out null queries on text searches. Harmless, but was generating overly complicated SQL. --- diff --git a/buglist.cgi b/buglist.cgi index 4a59cbbe86..bc4fbc5cb7 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -328,12 +328,13 @@ Click the Back button and try again."; foreach my $f ("short_desc", "long_desc", "bug_file_loc") { if (defined $::FORM{$f}) { - my $s = SqlQuote(trim($::FORM{$f})); + my $s = trim($::FORM{$f}); if ($s ne "") { + $s = SqlQuote($s); if ($::FORM{$f . "_type"} eq "regexp") { - $query .= "and $f regexp $s "; + $query .= "and $f regexp $s\n"; } else { - $query .= "and instr($f, $s) "; + $query .= "and instr($f, $s)\n"; } } }