Commit 92cee2c3 authored by terry%mozilla.org's avatar terry%mozilla.org

Patch by Markus Rex <msrex@suse.de> -- add a param to contorl whether to show quips.

parent 3ce4a388
...@@ -568,16 +568,16 @@ my $buglist = join(":", @bugarray); ...@@ -568,16 +568,16 @@ my $buglist = join(":", @bugarray);
# This is stupid. We really really need to move the quip list into the DB! # This is stupid. We really really need to move the quip list into the DB!
my $quip; my $quip;
if (open (COMMENTS, "<data/comments")) { if (Param('usequip')){
if (open (COMMENTS, "<data/comments")) {
my @cdata; my @cdata;
while (<COMMENTS>) { while (<COMMENTS>) {
push @cdata, $_; push @cdata, $_;
} }
close COMMENTS; close COMMENTS;
$quip = $cdata[int(rand($#cdata + 1))]; $quip = $cdata[int(rand($#cdata + 1))];
} }
if (!defined $quip) { $quip ||= "Bugzilla would like to put a random quip here, but nobody has entered any.";
$quip = "Bugzilla would like to put a random quip here, but nobody has entered any.";
} }
...@@ -612,7 +612,9 @@ if ($toolong) { ...@@ -612,7 +612,9 @@ if ($toolong) {
print "Next/Prev/First/Last buttons won't appear.</h2>\n"; print "Next/Prev/First/Last buttons won't appear.</h2>\n";
} }
print "<HR><A HREF=newquip.html><I>$quip</I></A></CENTER>\n"; if (Param('usequip')){
print "<HR><A HREF=newquip.html><I>$quip</I></A></CENTER>\n";
}
print "<HR SIZE=10>$tablestart\n"; print "<HR SIZE=10>$tablestart\n";
print $::bugl; print $::bugl;
print "</TABLE>\n"; print "</TABLE>\n";
......
...@@ -110,6 +110,10 @@ sub check_urlbase { ...@@ -110,6 +110,10 @@ sub check_urlbase {
return ""; return "";
} }
DefParam("usequip",
"If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips.",
"b",
1);
DefParam("usedespot", DefParam("usedespot",
"If this is on, then we are using the Despot system to control our database of users. Bugzilla won't ever write into the user database, it will let the Despot code maintain that. And Bugzilla will send the user over to Despot URLs if they need to change their password. Also, in that case, Bugzilla will treat the passwords stored in the database as being crypt'd, not plaintext.", "If this is on, then we are using the Despot system to control our database of users. Bugzilla won't ever write into the user database, it will let the Despot code maintain that. And Bugzilla will send the user over to Despot URLs if they need to change their password. Also, in that case, Bugzilla will treat the passwords stored in the database as being crypt'd, not plaintext.",
......
...@@ -147,7 +147,13 @@ $charts ...@@ -147,7 +147,13 @@ $charts
<td align=left> <td align=left>
<input type=checkbox name=links checked value=1>&nbsp;Links to Bugs<br> <input type=checkbox name=links checked value=1>&nbsp;Links to Bugs<br>
<input type=checkbox name=banner checked value=1>&nbsp;Banner<br> <input type=checkbox name=banner checked value=1>&nbsp;Banner<br>
<input type=checkbox name=quip value=1>&nbsp;Quip<br> FIN
if (Param('usequip')) {
print "<input type=checkbox name=quip value=1>&nbsp;Quip<br>";
} else {
print "<input type=hidden name=quip value=0>";
}
print <<FIN;
</td> </td>
</tr> </tr>
<tr> <tr>
......
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