diff options
-rw-r--r-- | CGI.pl | 31 | ||||
-rw-r--r-- | defparams.pl | 4 | ||||
-rwxr-xr-x | query.cgi | 13 |
3 files changed, 32 insertions, 16 deletions
@@ -220,17 +220,20 @@ sub make_options { my $last = ""; my $popup = ""; my $found = 0; - foreach my $item (@$src) { - if ($item eq "-blank-" || $item ne $last) { - if ($item eq "-blank-") { - $item = ""; - } - $last = $item; - if ($isregexp ? $item =~ $default : $default eq $item) { - $popup .= "<OPTION SELECTED VALUE=\"$item\">$item"; - $found = 1; - } else { - $popup .= "<OPTION VALUE=\"$item\">$item"; + + if ($src) { + foreach my $item (@$src) { + if ($item eq "-blank-" || $item ne $last) { + if ($item eq "-blank-") { + $item = ""; + } + $last = $item; + if ($isregexp ? $item =~ $default : $default eq $item) { + $popup .= "<OPTION SELECTED VALUE=\"$item\">$item"; + $found = 1; + } else { + $popup .= "<OPTION VALUE=\"$item\">$item"; + } } } } @@ -294,6 +297,9 @@ sub quietly_check_login() { } } } + if (!$loginok) { + delete $::COOKIE{"Bugzilla_login"}; + } return $loginok; } @@ -468,7 +474,8 @@ sub PutHeader { $h2 = ""; } - print "<HTML><HEAD><TITLE>$title</TITLE></HEAD>\n"; + print "<HTML><HEAD>\n<TITLE>$title</TITLE>\n"; + print Param("headerhtml") . "\n</HEAD>\n"; print "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\"\n"; print "LINK=\"#0000EE\" VLINK=\"#551A8B\" ALINK=\"#FF0000\">\n"; diff --git a/defparams.pl b/defparams.pl index df1a06396..9bcc9a567 100644 --- a/defparams.pl +++ b/defparams.pl @@ -131,6 +131,10 @@ sub check_despotbaseurl { } +DefParam("headerhtml", + "Additional HTML to add to the HEAD area of documents, eg. links to stylesheets.", + "l", + ''); DefParam("bannerhtml", @@ -219,11 +219,16 @@ foreach $v (@::legal_versions) { for $p (@::legal_product) { - foreach $c (@{$::components{$p}}) { - $jscript .= "cpts['$c'].push('$p');\n"; + if ($::components{$p}) { + foreach $c (@{$::components{$p}}) { + $jscript .= "cpts['$c'].push('$p');\n"; + } } - foreach $v (@{$::versions{$p}}) { - $jscript .= "vers['$v'].push('$p');\n"; + + if ($::versions{$p}) { + foreach $v (@{$::versions{$p}}) { + $jscript .= "vers['$v'].push('$p');\n"; + } } } |