httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@decus.org (Rodent of Unusual Size)
Subject [PATCH] to enhance bugdb.cgi
Date Thu, 24 Apr 1997 11:48:44 GMT
    Okey, here's a patch to enhance the bugdb.cgi script.  It

     o Adds searchability by class (change-request, sw-bug, ...)
     o Likewise for severity (critical, non-critical, ...)
     o Allows changing both of these when editing
     o Translates CRs into newlines (tr/\r/\n/)
     o Unbuffers STDOUT
     o Fixes an escaping bug (unescaped '@' in a string)
     o Requests "uname -a" in the environment section of new PRs

    You can test-drive it at

     http://dev.apache.org/~coar/bugdb.cgi

    The usual access information applies.

    #ken    :-)}

Index: bugdb.cgi
===================================================================
RCS file: /export/home/cvs/apache-site/bugdb.cgi,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 bugdb.cgi
*** bugdb.cgi	1997/03/25 04:43:15	1.1.1.1
--- bugdb.cgi	1997/04/24 11:43:58
***************
*** 87,106 ****
--- 87,112 ----
     # The first field is the restriction, the second field is the default option
  %quickrestr = (
  		"Category",    "any",
+ 		"Severity",    "any",
  		"Responsible", "any",
  #		"Originator",  "any",
+ 		"Class",       "any",
  		"State",       "open",
  	    );
     # Defines order of quick output restrictions
  @quickrestr = (
  		"Category",
+ 		"Severity",
  		"Responsible",
  #		"Originator",
+ 		"Class",
  		"State",
  	    );
  
  #################### Main routine
  # Main Program
+ select (STDOUT);
+ $| = 1;
  print "Content-type: text/html\n\n";
  print "<HTML>\n";
  
***************
*** 166,172 ****
  ### Main menu
  } elsif ($PATH_INFO eq "") {
      &main_menu();
!     print"<HR><SMALL>Version: 24 Aug 96<BR>Authors: <A HREF=\"http://alumni.caltech.edu/~dank\">Dan
Kegel</A> dank\@alumni.caltech.edu & <A HREF=\"http://alumni.caltech.edu/~huyle/\">Huy
Le</A> huyle\@alumni.caltech.edu, with revamp work by <A HREF=\"http://www.organic.com\">Brian
Behlendorf</A> brian@organic.com.</SMALL>\n";
  } else {
      print "<head><title>SPR Front End</title></head>
  <H1>SPR Front End</H1>
--- 172,178 ----
  ### Main menu
  } elsif ($PATH_INFO eq "") {
      &main_menu();
!     print"<HR><SMALL>Version: 24 Aug 96<BR>Authors: <A HREF=\"http://alumni.caltech.edu/~dank\">Dan
Kegel</A> dank\@alumni.caltech.edu & <A HREF=\"http://alumni.caltech.edu/~huyle/\">Huy
Le</A> huyle\@alumni.caltech.edu, with revamp work by <A HREF=\"http://www.organic.com\">Brian
Behlendorf</A> brian\@organic.com.</SMALL>\n";
  } else {
      print "<head><title>SPR Front End</title></head>
  <H1>SPR Front End</H1>
***************
*** 265,270 ****
--- 271,277 ----
  	# each line.  I think some browsers forget the last newline?
  	if ($fieldnames_multi{$key} > 0 && $value !~ /\n$/) {
  	    $value .= "\n";
+ 	    $value =~ tr/\r/\n/;
  	}
          $fieldvalues{$key}=$value;
      }
***************
*** 363,369 ****
  
      print <<EOM
  <P>
! <B>Environment</B> - What operating system, at what patchlevel?  What compiler?
 Etc.<BR>
  <TEXTAREA NAME="Environment" COLS=$width ROWS=$height></TEXTAREA><BR>
  <B>Synopsis</B> - a brief description of the problem at hand.<BR>
  <INPUT NAME="Synopsis" SIZE=$width><BR>
--- 370,377 ----
  
      print <<EOM
  <P>
! <B>Environment</B> - What operating system, at what patchlevel?  
! What compiler?  Etc. (The output from <CODE>uname -a</CODE> is very useful.)<BR>
  <TEXTAREA NAME="Environment" COLS=$width ROWS=$height></TEXTAREA><BR>
  <B>Synopsis</B> - a brief description of the problem at hand.<BR>
  <INPUT NAME="Synopsis" SIZE=$width><BR>
***************
*** 488,493 ****
--- 496,519 ----
  	    $fieldvalues{'State'} = $input{'State'};
  	}
  
+ 	if ($input{"Class"} ne $fieldvalues{'Class'}) {
+ 	    $change_msg .= "Class-Changed-From-To: $fieldvalues{'Class'}-$input{'Class'}
+ Class-Changed-By: $input{'Editor'}
+ Class-Changed-When: $date
+ ";
+ 	    $to_old = $to_subm = 1;
+ 	    $fieldvalues{'Class'} = $input{'Class'};
+ 	}
+ 
+ 	if ($input{"Severity"} ne $fieldvalues{'Severity'}) {
+ 	    $change_msg .= "Severity-Changed-From-To: $fieldvalues{'Severity'}-$input{'Severity'}
+ Severity-Changed-By: $input{'Editor'}
+ Severity-Changed-When: $date
+ ";
+ 	    $to_old = $to_subm = 1;
+ 	    $fieldvalues{'Severity'} = $input{'Severity'};
+ 	}
+ 
  	#print "if ($input{'Responsible'} ne $oldresp)\n";
  	if ($input{'Responsible'} ne $oldresp) {
  	    if ($input{'ResponsibleReason'} eq "") {
***************
*** 633,638 ****
--- 659,666 ----
      local($oldsyn) = $fieldvalues{"Synopsis"};
      local($oldstate) = $fieldvalues{"State"};
      local($oldresp) = $fieldvalues{"Responsible"};
+     local($oldclass) = $fieldvalues{"Class"};
+     local($oldsev) = $fieldvalues{"Severity"};
      $oldresp =~ s/\s*\(.*$//; # Get rid of comment in responsible party name
  
      local($timestamp)=&timestamp($fullpr);
***************
*** 662,667 ****
--- 690,715 ----
      }
      print "</SELECT><BR>\n";
  
+     print "
+ <dt>Class:
+ <dd><SELECT NAME=\"Class\">\n";
+     for (sort (@nClass)) {
+         $sel = "";
+ 	$sel = " SELECTED" if ($_ eq $oldclass);
+ 	print "<OPTION$sel> $_\n";
+     }
+     print "</SELECT><BR>\n";
+ 
+     print "
+ <dt>Severity:
+ <dd><SELECT NAME=\"Severity\">\n";
+     for (sort (@nSeverity)) {
+         $sel = "";
+ 	$sel = " SELECTED" if ($_ eq $oldsev);
+ 	print "<OPTION$sel> $_\n";
+     }
+     print "</SELECT><BR>\n";
+ 
      print "<dt>New <a href=\"$GNUINFOSCRIPT?(gnats.info)States\">state</a>:\n";
      print "<dd>";
      print "<SELECT NAME=\"State\">\n";
***************
*** 1062,1068 ****
  sub query_full
  {
      local($pr) = $_[0];
!     print "<head><title>Full Problem Report Text</title></head>
  <body>
  ";
      if ($pr eq "") {
--- 1110,1116 ----
  sub query_full
  {
      local($pr) = $_[0];
!     print "<head><title>Full Problem Report Text for PR#$pr</title></head>
  <body>
  ";
      if ($pr eq "") {

Mime
View raw message