From 1254fcb8c43defcbce99713f5cd85a104670895e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 31 Oct 2005 05:31:27 +0000 Subject: =?UTF-8?q?Bug=20304075:=20Eliminate=20use=20of=20$::userid=20from?= =?UTF-8?q?=20Bugzilla=20-=20Patch=20by=20Fr=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dwicked=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quips.cgi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'quips.cgi') diff --git a/quips.cgi b/quips.cgi index c7dadee5d..b2fd482bc 100755 --- a/quips.cgi +++ b/quips.cgi @@ -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; } -- cgit v1.2.1