help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

another minor patch to gnatsweb 2.9.0


From: Robert Lupton the Good
Subject: another minor patch to gnatsweb 2.9.0
Date: Tue, 18 Sep 2001 13:10:24 -0400

Here's another patch to fix a number of minor problems.

1/ A number of undefined variables --- these produce worrying messages
in the httpd logs.

Specifically:
        check that $fields{'Responsible'} is defined

        ensure that $global_prefs{'columns'} is always defined

        Set a value for gnatsweb-test-cookie to work around an
        assumption in at least my copy of CGI::cookie

2/ Fix the "Login Again" button at the top of each page, by changing
the action to
        cmd=login%20again


Did my patches to e.g. load pre-existing queries make it into gnatsweb?


                                        R


*** gnatsweb.pl.1       Mon Sep 17 13:59:36 2001
--- gnatsweb.pl.2       Tue Sep 18 13:04:57 2001
***************
*** 586,592 ****
  
    # If Responsible is '<default>', delete it; gnats handles that.  See
    # also &sendpr.
!   if($fields{'Responsible'} eq '<default>') {
      delete $fields{'Responsible'};
    }
  
--- 586,592 ----
  
    # If Responsible is '<default>', delete it; gnats handles that.  See
    # also &sendpr.
!   if(defined($fields{'Responsible'}) && $fields{'Responsible'} eq 
'<default>') {
      delete $fields{'Responsible'};
    }
  
***************
*** 786,792 ****
      {
        $valign = 'valign=top';
        $val =~ s/$/<br>/gm;
!       $val =~ s/<br>$//; # previous substitution added one too many <br>'s
        $val = mark_urls($val);
      }
      print "<tr><td $valign nowrap><b>$_:</b></td>\n<td>",
--- 786,792 ----
      {
        $valign = 'valign=top';
        $val =~ s/$/<br>/gm;
!       $val =~ s/<br>$//; # previous substitution added one too many <br>s
        $val = mark_urls($val);
      }
      print "<tr><td $valign nowrap><b>$_:</b></td>\n<td>",
***************
*** 2412,2418 ****
    $row2 .= qq(<TD><A HREF="$url&cmd=create" 
STYLE="$buttonstyle">CREATE</A></TD>);
    $row2 .= qq(<TD><A HREF="$url&cmd=query" 
STYLE="$buttonstyle">QUERY</A></TD>);
    $row2 .= qq(<TD><A HREF="$url&cmd=advanced%20query" 
STYLE="$buttonstyle">ADV. QUERY</A></TD>);
!   $row2 .= qq(<TD><A HREF="$url&cmd=login again" STYLE="$buttonstyle">LOGIN 
AGAIN</A></TD>);
    $row2 .= qq(<TD><A HREF="$url&cmd=help" STYLE="$buttonstyle">HELP</A></TD>);
    $row2 .= qq(</TR>\n);
    $row2 .= qq(</TABLE>\n</TD>\n</TR>);
--- 2411,2417 ----
    $row2 .= qq(<TD><A HREF="$url&cmd=create" 
STYLE="$buttonstyle">CREATE</A></TD>);
    $row2 .= qq(<TD><A HREF="$url&cmd=query" 
STYLE="$buttonstyle">QUERY</A></TD>);
    $row2 .= qq(<TD><A HREF="$url&cmd=advanced%20query" 
STYLE="$buttonstyle">ADV. QUERY</A></TD>);
!   $row2 .= qq(<TD><A HREF="$url&cmd=login%20again" STYLE="$buttonstyle">LOGIN 
AGAIN</A></TD>);
    $row2 .= qq(<TD><A HREF="$url&cmd=help" STYLE="$buttonstyle">HELP</A></TD>);
    $row2 .= qq(</TR>\n);
    $row2 .= qq(</TABLE>\n</TD>\n</TR>);
***************
*** 3130,3136 ****
  exp = new Date();
  exp.setTime(exp.getTime() + (1000 * 60 * 60)); // +1 hour
  setCookie("gnatsweb-test-cookie", "whatever", exp);
! val = getCookie("gnatsweb-test-cookie");
  delCookie("gnatsweb-test-cookie");
  if (val == null) {
      document.write("<h2>Warning: your browser is not accepting cookies!</h2>"
--- 3129,3135 ----
  exp = new Date();
  exp.setTime(exp.getTime() + (1000 * 60 * 60)); // +1 hour
  setCookie("gnatsweb-test-cookie", "whatever", exp);
! val = getCookie("gnatsweb-test-cookie=1");
  delCookie("gnatsweb-test-cookie");
  if (val == null) {
      document.write("<h2>Warning: your browser is not accepting cookies!</h2>"
***************
*** 3274,3279 ****
--- 3273,3280 ----
    }
    elsif (defined($cvals{'columns'})) {
      $global_prefs{'columns'} = $cvals{'columns'};
+   } else {
+     $global_prefs{'columns'} = '';
    }
  
    # DB prefs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]