diff options
author | bugreport%peshkin.net <> | 2002-08-17 08:28:55 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2002-08-17 08:28:55 +0200 |
commit | e9d56927daa4929f7f406c114730bb0730016602 (patch) | |
tree | 301244b270cf5289bd020cf435c7d54ca332c95b | |
parent | e8584108d410cc2cf63124d88d640aff6821b975 (diff) | |
download | bugzilla-e9d56927daa4929f7f406c114730bb0730016602.tar.gz bugzilla-e9d56927daa4929f7f406c114730bb0730016602.tar.xz |
Bug 10037 - param to disable adding new quips
r=imajes, preed
-rw-r--r-- | defparams.pl | 10 | ||||
-rwxr-xr-x | quips.cgi | 6 | ||||
-rw-r--r-- | template/en/default/list/list.html.tmpl | 2 |
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", @@ -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 %] |