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 --- Bugzilla/User.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Bugzilla/User.pm') diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm index 67b79f168..0a67400b3 100644 --- a/Bugzilla/User.pm +++ b/Bugzilla/User.pm @@ -539,6 +539,7 @@ sub match { my $wildstr = $str; my $user = Bugzilla->user; + my $dbh = Bugzilla->dbh; if ($wildstr =~ s/\*/\%/g && # don't do wildcards if no '*' in the string Param('usermatchmode') ne 'off') { # or if we only want exact matches @@ -561,7 +562,7 @@ sub match { } $query .= " AND disabledtext = '' " if $exclude_disabled; $query .= "ORDER BY length(login_name) "; - $query .= "LIMIT $limit " if $limit; + $query .= $dbh->sql_limit($limit) if $limit; # Execute the query, retrieve the results, and make them into # User objects. @@ -611,7 +612,7 @@ sub match { } $query .= " AND disabledtext = '' " if $exclude_disabled; $query .= "ORDER BY length(login_name) "; - $query .= "LIMIT $limit " if $limit; + $query .= $dbh->sql_limit($limit) if $limit; &::PushGlobalSQLState(); &::SendSQL($query); push(@users, new Bugzilla::User(&::FetchSQLData())) while &::MoreSQLData(); -- cgit v1.2.1