diff options
author | lpsolit%gmail.com <> | 2005-10-31 05:31:27 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2005-10-31 05:31:27 +0000 |
commit | 1254fcb8c43defcbce99713f5cd85a104670895e (patch) | |
tree | 3b842a5b96f429d0db2d5ade3ba409cf1fae7e5a /quips.cgi | |
parent | Bug 314088: Several Bugzilla::Foo->new crash when passing a string instead of... (diff) | |
download | bugzilla-1254fcb8c43defcbce99713f5cd85a104670895e.tar.gz bugzilla-1254fcb8c43defcbce99713f5cd85a104670895e.tar.bz2 bugzilla-1254fcb8c43defcbce99713f5cd85a104670895e.zip |
Bug 304075: Eliminate use of $::userid from Bugzilla - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=justdave
Diffstat (limited to 'quips.cgi')
-rwxr-xr-x | quips.cgi | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -25,15 +25,13 @@ use strict; -use vars qw($userid); - use lib qw(.); require "globals.pl"; use Bugzilla::Constants; -Bugzilla->login(LOGIN_REQUIRED); +my $user = Bugzilla->login(LOGIN_REQUIRED); my $cgi = Bugzilla->cgi; my $dbh = Bugzilla->dbh; @@ -82,7 +80,7 @@ if ($action eq "add") { trick_taint($comment); # Used in a placeholder below $dbh->do("INSERT INTO quips (userid, quip, approved) VALUES (?, ?, ?)", - undef, ($userid, $comment, $approved)); + undef, ($user->id, $comment, $approved)); $vars->{'added_quip'} = $comment; } |