summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--defparams.pl10
-rwxr-xr-xquips.cgi6
-rw-r--r--template/en/default/list/list.html.tmpl2
3 files changed, 13 insertions, 5 deletions
diff --git a/defparams.pl b/defparams.pl
index 5a1abdc43..991b8b220 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -259,10 +259,12 @@ DefParam("cookiepath",
"t",
"/");
-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("enablequips",
+ "If this is on, Bugzilla displays a silly quip at the beginning of buglists, and lets users add to the list of quips. If this is frozen, Bugzilla will display the quip but not permit new additions.",
+ "s",
+ [['on','frozen','off'], (($::param{"usequip"} || 1) ? 'on' : 'off')],
+ \&check_multi);
+
# Added parameter - JMR, 2/16/00
DefParam("usebuggroups",
diff --git a/quips.cgi b/quips.cgi
index 234c2f463..a50bbc54a 100755
--- a/quips.cgi
+++ b/quips.cgi
@@ -62,7 +62,13 @@ if ($action eq "add") {
DisplayError("Please enter a quip in the text field.");
exit();
}
+
+ if (Param('enablequips') ne "on") {
+ ThrowUserError("This site does not permit the addition of new quips");
+ exit();
+ }
+
if ($comment =~ m/</) {
DisplayError("Sorry - for security reasons, support for HTML tags has
been turned off in quips.");
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index d50d54cc5..65f939e6a 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -44,7 +44,7 @@
<p>[% query FILTER html %]</p>
[% END %]
- [% IF Param('usequip') %]
+ [% IF Param('enablequips') != 'off' %]
[% DEFAULT quip = "Bugzilla would like to put a random quip here, but no one has entered any." %]
<a href="quips.cgi"><i>[% quip FILTER html %]</i></a>
[% END %]