Commit a6681fdc authored by terry%netscape.com's avatar terry%netscape.com

Patch by David Gardiner <david.gardiner@unisa.edu.au> -- added new headerhtml

param to allow people to customize the html put in the <HEAD> portion of generated documents. Also, a few other minor patches.
parent 52f6d572
...@@ -220,6 +220,8 @@ sub make_options { ...@@ -220,6 +220,8 @@ sub make_options {
my $last = ""; my $last = "";
my $popup = ""; my $popup = "";
my $found = 0; my $found = 0;
if ($src) {
foreach my $item (@$src) { foreach my $item (@$src) {
if ($item eq "-blank-" || $item ne $last) { if ($item eq "-blank-" || $item ne $last) {
if ($item eq "-blank-") { if ($item eq "-blank-") {
...@@ -234,6 +236,7 @@ sub make_options { ...@@ -234,6 +236,7 @@ sub make_options {
} }
} }
} }
}
if (!$found && $default ne "") { if (!$found && $default ne "") {
$popup .= "<OPTION SELECTED>$default"; $popup .= "<OPTION SELECTED>$default";
} }
...@@ -294,6 +297,9 @@ sub quietly_check_login() { ...@@ -294,6 +297,9 @@ sub quietly_check_login() {
} }
} }
} }
if (!$loginok) {
delete $::COOKIE{"Bugzilla_login"};
}
return $loginok; return $loginok;
} }
...@@ -468,7 +474,8 @@ sub PutHeader { ...@@ -468,7 +474,8 @@ sub PutHeader {
$h2 = ""; $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 "<BODY BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\"\n";
print "LINK=\"#0000EE\" VLINK=\"#551A8B\" ALINK=\"#FF0000\">\n"; print "LINK=\"#0000EE\" VLINK=\"#551A8B\" ALINK=\"#FF0000\">\n";
......
...@@ -131,6 +131,10 @@ sub check_despotbaseurl { ...@@ -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", DefParam("bannerhtml",
......
...@@ -219,12 +219,17 @@ foreach $v (@::legal_versions) { ...@@ -219,12 +219,17 @@ foreach $v (@::legal_versions) {
for $p (@::legal_product) { for $p (@::legal_product) {
if ($::components{$p}) {
foreach $c (@{$::components{$p}}) { foreach $c (@{$::components{$p}}) {
$jscript .= "cpts['$c'].push('$p');\n"; $jscript .= "cpts['$c'].push('$p');\n";
} }
}
if ($::versions{$p}) {
foreach $v (@{$::versions{$p}}) { foreach $v (@{$::versions{$p}}) {
$jscript .= "vers['$v'].push('$p');\n"; $jscript .= "vers['$v'].push('$p');\n";
} }
}
} }
$i = 0; $i = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment