From 3f50ed4d9836e40af440ea51c8e280ede2b68128 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" Date: Mon, 27 Sep 1999 21:25:19 +0000 Subject: [PATCH] Patch by Markus Rex -- add a param to contorl whether to show quips. --- webtools/bugzilla/buglist.cgi | 14 ++++++++------ webtools/bugzilla/defparams.pl | 4 ++++ webtools/bugzilla/reports.cgi | 8 +++++++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/webtools/bugzilla/buglist.cgi b/webtools/bugzilla/buglist.cgi index 8d3182200dd..d780e2af2d1 100755 --- a/webtools/bugzilla/buglist.cgi +++ b/webtools/bugzilla/buglist.cgi @@ -568,16 +568,16 @@ my $buglist = join(":", @bugarray); # This is stupid. We really really need to move the quip list into the DB! my $quip; -if (open (COMMENTS, ") { - push @cdata, $_; + push @cdata, $_; } close COMMENTS; $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) { print "Next/Prev/First/Last buttons won't appear.\n"; } -print "
$quip\n"; +if (Param('usequip')){ + print "
$quip\n"; +} print "
$tablestart\n"; print $::bugl; print "\n"; diff --git a/webtools/bugzilla/defparams.pl b/webtools/bugzilla/defparams.pl index ee85802e8f9..a7c4ba06074 100644 --- a/webtools/bugzilla/defparams.pl +++ b/webtools/bugzilla/defparams.pl @@ -110,6 +110,10 @@ sub check_urlbase { 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", "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.", diff --git a/webtools/bugzilla/reports.cgi b/webtools/bugzilla/reports.cgi index 21cfd780e37..0b78969afd2 100755 --- a/webtools/bugzilla/reports.cgi +++ b/webtools/bugzilla/reports.cgi @@ -147,7 +147,13 @@ $charts  Links to Bugs
 Banner
- Quip
+FIN + if (Param('usequip')) { + print " Quip
"; + } else { + print ""; + } + print <