]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2000-10-02 02:28:26 by ajt]
authorajt <>
Mon, 2 Oct 2000 09:28:26 +0000 (01:28 -0800)
committerajt <>
Mon, 2 Oct 2000 09:28:26 +0000 (01:28 -0800)
Add report by submitter pages
  pkgreport.cgi?submitter=foo@bar.com

cgi/common.pl
cgi/pkgreport.cgi

index 3988d5b5be6e97dabc396e15c83551e82752070b..a9b1d9c7aae2fb77c935d52fe843eaab69fd0030 100644 (file)
@@ -197,6 +197,17 @@ sub htmlizebugs {
     return $result;
 }
 
+sub submitterbugs {
+    my $maint = shift;
+    my $chk = sub {
+        my %d = @_;
+        ($maintemail = $d{"maint"}) =~ s/\s*\(.*\)\s*//;
+        if ($maintemail =~ m/<(.*)>/) { $maintemail = $1 }
+        return $maintemail eq $maint;
+    };
+    return getbugs($chk);
+}
+
 sub maintbugs {
     my $maint = shift;
     my %maintainers = getmaintainers();
index d58f7deb2c703556fb3ccfbb6e27c9a848af7843..22a9c21287af474c042a6f4aac4f3d7d4955af5a 100755 (executable)
@@ -15,10 +15,11 @@ require '/etc/debbugs/text';
 my $pkg = param('pkg');
 my $maint = defined $pkg ? undef : param('maint');
 my $maintenc = (defined $pkg || defined $maint) ? undef : param('maintenc');
+my $submitter = (defined $pkg || defined $maint || defined $maintenc) ? undef : param('submitter');
 my $repeatmerged = (param('repeatmerged') || "yes") eq "yes";
 my $archive = (param('archive') || "no") eq "yes";
 
-$pkg = 'ALL' unless (defined($pkg) || defined($maint) || defined($maintenc));
+$pkg = 'ALL' unless (defined($pkg) || defined($maint) || defined($maintenc)) || defined($submitter);
 
 my $Archived = $archive ? "Archived" : "";
 
@@ -38,8 +39,10 @@ if (defined $pkg) {
     $tag = "package $pkg";
 } elsif (defined $maint) {
     $tag = "maintainer $maint";
-} else {
+} elsif (defined $maintenc) {
     $tag = "maintainer $maintenc";
+} else {
+    $tag = "submitter $submitter";
 }
 
 set_option("repeatmerged", $repeatmerged);
@@ -50,8 +53,10 @@ if (defined $pkg) {
     @bugs = pkgbugs($pkg);
 } elsif (defined $maint) {
     @bugs = maintbugs($maint);
+} elsif (defined $maintenc) {
+    @bugs = maintbugs($maintenc);
 } else {
-    @bugs = maintencbugs($maintenc);
+    @bugs = submitterbugs($submitter);
 }
 
 my $result = htmlizebugs(@bugs);
@@ -75,10 +80,14 @@ if (defined $maintainer{$pkg}) {
 if (defined $pkg) {
     print "<p>Note that with multi-binary packages there may be other\n";
     print "reports filed under the different binary package names.</p>\n";
-} else {
+} elsif (defined $maint || defined $maintenc) {
     print "<p>Note that maintainers may use different Maintainer fields for\n";
     print "different packages, so there may be other reports filed under\n";
     print "different addresses.\n";
+} elsif (defined $submitter) {
+    print "<p>Note that people may use different email accounts for\n";
+    print "different bugs, so there may be other reports filed under\n";
+    print "different addresses.\n";
 }
 
 print $result;