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/Search.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/Search.pm')
-rw-r--r-- | Bugzilla/Search.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm index 7740e7402..816b4b0a1 100644 --- a/Bugzilla/Search.pm +++ b/Bugzilla/Search.pm @@ -1393,6 +1393,8 @@ sub ListIDsForEmail { my $old = $self->{"emailcache"}{"$type,$email"}; return undef if ($old && $old eq "---"); return $old if $old; + + my $dbh = Bugzilla->dbh; my @list = (); my $list = "---"; if ($type eq 'anyexact') { @@ -1406,7 +1408,7 @@ sub ListIDsForEmail { $list = join(',', @list); } elsif ($type eq 'substring') { &::SendSQL("SELECT userid FROM profiles WHERE INSTR(login_name, " . - &::SqlQuote($email) . ") LIMIT 51"); + &::SqlQuote($email) . ") " . $dbh->sql_limit(51)); while (&::MoreSQLData()) { my ($id) = &::FetchSQLData(); push(@list, $id); |