From 78865fda79e5b78288aafd75b531924c73b27883 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Fri, 21 Jan 2000 05:31:18 +0000 Subject: Moved all the long descriptions out of the bugs table, and into a new table. There is now a separate entry for each new long description, rather than appending them all together in one big field. --- buglist.cgi | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 27e67e390..2309b3205 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -480,15 +480,23 @@ foreach my $f ("short_desc", "long_desc", "bug_file_loc", if (defined $::FORM{$f}) { my $s = trim($::FORM{$f}); if ($s ne "") { + my $n = $f; $s = SqlQuote($s); - if ($::FORM{$f . "_type"} eq "regexp") { - $query .= "and $f regexp $s\n"; - } 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"; + my $type = $::FORM{$f . "_type"}; + if ($f eq "long_desc") { + # Patch in the longdescs table. + $query =~ s/where/, longdescs where/; + $query .= "and longdescs.bug_id = bugs.bug_id\n"; + $n = "longdescs.thetext"; + } + if ($type eq "regexp") { + $query .= "and $n regexp $s\n"; + } elsif ($type eq "notregexp") { + $query .= "and $n not regexp $s\n"; + } elsif ($type eq "casesubstring") { + $query .= "and instr($n, $s)\n"; } else { - $query .= "and instr(lower($f), lower($s))\n"; + $query .= "and instr(lower($n), lower($s))\n"; } } } -- cgit v1.2.3-24-g4f1b