aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-19 00:14:26 +0000
committermkanat%kerio.com <>2005-02-19 00:14:26 +0000
commitb9402d3e113b408143c7ad18f1cb798023c7d178 (patch)
treeead35cce72a5f7be7fa8660561159eca2174185d /userprefs.cgi
parentBug 280494: Replace "SELECT LAST_INSERT_ID()" with Bugzilla::DB function call (diff)
downloadbugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.gz
bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.bz2
bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.zip
Bug 280497: Replace "LIMIT" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=justdave
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi3
1 files changed, 2 insertions, 1 deletions
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;