diff options
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); |