diff options
author | gerv%gerv.net <> | 2003-01-06 15:53:11 +0000 |
---|---|---|
committer | gerv%gerv.net <> | 2003-01-06 15:53:11 +0000 |
commit | ef85a567fdb1c5d58223902316351d57f062897d (patch) | |
tree | 15ce0756f457f0d78ad97a7fa1dd973831872557 /quips.cgi | |
parent | ed5513d9d67a8b789cfa20e29316cf3d025df0d5 (diff) | |
download | bugs-ef85a567fdb1c5d58223902316351d57f062897d.tar bugs-ef85a567fdb1c5d58223902316351d57f062897d.tar.gz bugs-ef85a567fdb1c5d58223902316351d57f062897d.tar.bz2 bugs-ef85a567fdb1c5d58223902316351d57f062897d.tar.xz bugs-ef85a567fdb1c5d58223902316351d57f062897d.zip |
Bug 187837 - Unify showing and editing of quips. Patch by gerv; r=timeless, a=justdave.
Diffstat (limited to 'quips.cgi')
-rwxr-xr-x | quips.cgi | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -46,23 +46,6 @@ my $action = $::FORM{'action'} || ""; if ($action eq "show") { # Read in the entire quip list - SendSQL("SELECT quip FROM quips"); - - my @quips; - while (MoreSQLData()) { - my ($quip) = FetchSQLData(); - push(@quips, $quip); - } - - $vars->{'quips'} = \@quips; - $vars->{'show_quips'} = 1; -} - -if ($action eq "edit") { - if (!UserInGroup('admin')) { - ThrowUserError("quips_edit_denied"); - } - # Read in the entire quip list SendSQL("SELECT quipid,userid,quip FROM quips"); my $quips; @@ -83,7 +66,7 @@ if ($action eq "edit") { $vars->{'quipids'} = \@quipids; $vars->{'quips'} = $quips; $vars->{'users'} = $users; - $vars->{'edit_quips'} = 1; + $vars->{'show_quips'} = 1; } if ($action eq "add") { |