From: terry%mozilla.org <> Date: Tue, 25 May 1999 04:16:18 +0000 (+0000) Subject: Patch by Mark B. Hamby (somewhat hacked up by me) -- X-Git-Tag: bugzilla-2.6~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79217b1435887bce8c698e3bc2a683833be6394a;p=thirdparty%2Fbugzilla.git Patch by Mark B. Hamby (somewhat hacked up by me) -- Allow case insensitive and regexp based searches for strings in bugs. --- diff --git a/buglist.cgi b/buglist.cgi index 53026b7d6c..dbc056e292 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -421,8 +421,12 @@ foreach my $f ("short_desc", "long_desc", "bug_file_loc", $s = SqlQuote($s); if ($::FORM{$f . "_type"} eq "regexp") { $query .= "and $f regexp $s\n"; - } else { + } elsif ($::FORM{$f . "_type"} eq "notregexp") { + $query .= "and $f not regexp $s\n"; + } elsif ($::FORM{$f . "_type"} eq "casesubstring") { $query .= "and instr($f, $s)\n"; + } else { + $query .= "and instr(lower($f), lower($s))\n"; } } } diff --git a/query.cgi b/query.cgi index 144449ae8e..54362fabde 100755 --- a/query.cgi +++ b/query.cgi @@ -68,7 +68,10 @@ foreach my $name ("bug_status", "resolution", "assigned_to", "rep_platform", "emailassigned_to1", "emailcc1", "emailqa_contact1", "email2", "emailtype2", "emailreporter2", "emailassigned_to2", "emailcc2", "emailqa_contact2", - "changedin") { + "changedin", "short_desc", "short_desc_type", + "long_desc", "long_desc_type", "bug_file_loc", + "bug_file_loc_type", "status_whiteboard", + "status_whiteboard_type") { $default{$name} = ""; $type{$name} = 0; } @@ -472,38 +475,49 @@ if (Param("usetargetmilestone")) { "; } + +sub StringSearch { + my ($desc, $name) = (@_); + my $type = $name . "_type"; + my $def = value_quote($default{$name}); + print qq{ +$desc: + + + +"; +} + print " - - - - - - - - - - - - - - - - -"; +"; + +StringSearch("Summary", "short_desc"); +StringSearch("Description", "long_desc"); +StringSearch("URL", "bug_file_loc"); if (Param("usestatuswhiteboard")) { - print " - - - - - -"; + StringSearch("Status whiteboard", "status_whiteboard"); } print "
Summary:SubstringRegexp
Description:SubstringRegexp
URL:SubstringRegexp
Status whiteboard:SubstringRegexp