From: ajt <> Date: Tue, 6 Feb 2001 11:13:56 +0000 (-0800) Subject: [project @ 2001-02-06 03:13:56 by ajt] X-Git-Tag: release/2.6.0~1158 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c94b2477e9fc2b2a51af584eb0e556ea4bfa82f3;p=debbugs.git [project @ 2001-02-06 03:13:56 by ajt] add support for filtering on subject with include=subj:foo (exact match, case sensitive, only) --- diff --git a/cgi/common.pl b/cgi/common.pl index 2dea01b7..5edc06ab 100644 --- a/cgi/common.pl +++ b/cgi/common.pl @@ -220,6 +220,11 @@ sub htmlizebugs { foreach my $t (split /\s+/, $status{tags}) { $okay = 1, last if (defined $common_include{$t}); } + if (defined $common_include{subj}) { + if (index($status{subject}, $common_include{subj}) > -1) { + $okay = 1; + } + } next unless ($okay); } if (%common_exclude) { @@ -227,6 +232,11 @@ sub htmlizebugs { foreach my $t (split /\s+/, $status{tags}) { $okay = 0, last if (defined $comon_exclude{$t}); } + if (defined $common_exclude{subj}) { + if (index($status{subject}, $common_exclude{subj}) > -1) { + $okay = 0; + } + } next unless ($okay); } diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 6fe13e76..396671a9 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -50,9 +50,9 @@ $tail_html =~ s/SUBSTITUTE_DTIME/$dtime/; set_option("repeatmerged", $repeatmerged); set_option("archive", $archive); -set_option("include", { map {($_,1)} (split /[\s,]+/, $include) }) +set_option("include", { map {if (m/^(.*):(.*)$/) { ($1,$2) } else { ($_,1) }} (split /[\s,]+/, $include) }) if ($include); -set_option("exclude", { map {($_,1)} (split /[\s,]+/, $exclude) }) +set_option("exclude", { map {if (m/^(.*):(.*)$/) { ($1,$2) } else { ($_,1) }} (split /[\s,]+/, $exclude) }) if ($exclude); my $tag;