diff options
author | travis%sedsystems.ca <> | 2005-03-11 01:21:33 +0100 |
---|---|---|
committer | travis%sedsystems.ca <> | 2005-03-11 01:21:33 +0100 |
commit | ab5067bb0995cce2afe51803b5f005cc9f994416 (patch) | |
tree | 93ee81693db753abb0660f6effb44c9706bcf0a5 /quips.cgi | |
parent | 6674f61905d98aee08b95c22181aa439bfb041e5 (diff) | |
download | bugzilla-ab5067bb0995cce2afe51803b5f005cc9f994416.tar.gz bugzilla-ab5067bb0995cce2afe51803b5f005cc9f994416.tar.xz |
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-x | quips.cgi | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -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"); |