Commit e9d56927 authored by bugreport%peshkin.net's avatar bugreport%peshkin.net

Bug 10037 - param to disable adding new quips

r=imajes, preed
parent e8584108
......@@ -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",
......
......@@ -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.");
......
......@@ -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 %]
......
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