From b9402d3e113b408143c7ad18f1cb798023c7d178 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sat, 19 Feb 2005 00:14:26 +0000 Subject: Bug 280497: Replace "LIMIT" with Bugzilla::DB function call Patch By Tomas Kopal r=mkanat,a=justdave --- userprefs.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'userprefs.cgi') diff --git a/userprefs.cgi b/userprefs.cgi index 193a4d73f..a1239ca8f 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -49,6 +49,7 @@ my @reasons = ("Removeme", "Comments", "Attachments", "Status", "Resolved", # SaveFoo may be called before DoFoo. ############################################################################### sub DoAccount { + my $dbh = Bugzilla->dbh; SendSQL("SELECT realname FROM profiles WHERE userid = $userid"); $vars->{'realname'} = FetchSQLData(); @@ -57,7 +58,7 @@ sub DoAccount { FROM tokens WHERE userid = $userid AND tokentype LIKE 'email%' - ORDER BY tokentype ASC LIMIT 1"); + ORDER BY tokentype ASC " . $dbh->sql_limit(1)); if(MoreSQLData()) { my ($tokentype, $change_date, $eventdata) = &::FetchSQLData(); $vars->{'login_change_date'} = $change_date; -- cgit v1.2.3-24-g4f1b