aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-03-11 00:21:33 +0000
committertravis%sedsystems.ca <>2005-03-11 00:21:33 +0000
commitab5067bb0995cce2afe51803b5f005cc9f994416 (patch)
tree93ee81693db753abb0660f6effb44c9706bcf0a5 /quips.cgi
parentBug 98123 : Create a user preferences infrastructure (became 'General Settings') (diff)
downloadbugzilla-ab5067bb0995cce2afe51803b5f005cc9f994416.tar.gz
bugzilla-ab5067bb0995cce2afe51803b5f005cc9f994416.tar.bz2
bugzilla-ab5067bb0995cce2afe51803b5f005cc9f994416.zip
Bug 41972 : Per-user pref to turn quips off
Patch by Shane H. W. Travis <travis@sedsystems.ca> r=mkanat a=justdave
Diffstat (limited to 'quips.cgi')
-rwxr-xr-xquips.cgi14
1 files changed, 5 insertions, 9 deletions
diff --git a/quips.cgi b/quips.cgi
index dc0106450..766d1a792 100755
--- a/quips.cgi
+++ b/quips.cgi
@@ -41,10 +41,6 @@ Bugzilla->login(LOGIN_REQUIRED);
my $cgi = Bugzilla->cgi;
-if (Param('enablequips') eq "off") {
- ThrowUserError("quips_disabled");
-}
-
my $action = $cgi->param('action') || "";
if ($action eq "show") {
@@ -75,12 +71,12 @@ if ($action eq "show") {
}
if ($action eq "add") {
- (Param('enablequips') eq "on" or Param('enablequips') eq "approved")
- || ThrowUserError("no_new_quips");
-
+ (Param('quip_list_entry_control') eq "closed") &&
+ ThrowUserError("no_new_quips");
+
# Add the quip
- my $approved = (Param('enablequips') eq "on") ? '1' : '0';
- $approved = 1 if(UserInGroup('admin'));
+ my $approved =
+ (Param('quip_list_entry_control') eq "open") || (UserInGroup('admin')) || 0;
my $comment = $cgi->param("quip");
$comment || ThrowUserError("need_quip");
$comment !~ m/</ || ThrowUserError("no_html_in_quips");