diff options
author | mkanat%kerio.com <> | 2005-02-19 01:14:26 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-19 01:14:26 +0100 |
commit | b9402d3e113b408143c7ad18f1cb798023c7d178 (patch) | |
tree | ead35cce72a5f7be7fa8660561159eca2174185d /Bugzilla/User.pm | |
parent | 62eecf24480520e204ab0057f8f7845c13f37c13 (diff) | |
download | bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.gz bugzilla-b9402d3e113b408143c7ad18f1cb798023c7d178.tar.xz |
Bug 280497: Replace "LIMIT" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=justdave
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r-- | Bugzilla/User.pm | 5 |
1 files changed, 3 insertions, 2 deletions
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(); |