process_bug.cgi as backend and dontchange

Christian Reis kiko at async.com.br
Fri Oct 25 20:07:38 UTC 2002


On Fri, Oct 25, 2002 at 04:50:27PM -0300, Christian Reis wrote:
> I *think* this could be fixed by changing the way process_bug handles
> the tests for dontchange. I'll exemplify with a small patch:

The previous patch, together with this small change in CGI.pl make
things work smoothly, but are there evil side-effects?

Index: CGI.pl
===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/CGI.pl,v
retrieving revision 1.187
diff -u -r1.187 CGI.pl
--- CGI.pl      17 Oct 2002 04:31:49 -0000      1.187
+++ CGI.pl      25 Oct 2002 19:58:14 -0000
@@ -239,9 +239,10 @@
        ) = @_;
 
     if ( !defined $formRef->{$fieldname} ||
-         trim($formRef->{$fieldname}) eq "" ||
+         (trim($formRef->{$fieldname}) eq "" ||
          (defined($legalsRef) && 
-          lsearch($legalsRef, $formRef->{$fieldname})<0) ){
+          lsearch($legalsRef, $formRef->{$fieldname})<0) )
+          && $formRef->{$fieldname} != $formRef->{'dontchange'}) {
 
         SendSQL("SELECT description FROM fielddefs WHERE name=" .
SqlQuote($fieldname));
         my $result = FetchOneColumn();

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL



More information about the developers mailing list