summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-07-08 11:34:03 +0200
committermkanat%kerio.com <>2005-07-08 11:34:03 +0200
commit0811ac92bf752121208867728aa4629b9eb9c02a (patch)
tree730552d2c127f5992639e3852eeea105e1e7c71a /Bugzilla/User.pm
parent4f25eedf9065f28badf1e5e1df6c925062d8279e (diff)
downloadbugzilla-0811ac92bf752121208867728aa4629b9eb9c02a.tar.gz
bugzilla-0811ac92bf752121208867728aa4629b9eb9c02a.tar.xz
Bug 292119: [PostgreSQL] POSITION(...) clause "must be type boolean, not type integer"
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=justdave
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 0c2de0f4c..c9817a4d9 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -682,18 +682,18 @@ sub match {
&& (length($str) >= 3))
{
- my $sqlstr = &::SqlQuote(uc($str));
+ my $sqlstr = &::SqlQuote(lc($str));
- my $query = "SELECT DISTINCT userid, realname, login_name, " .
+ my $query = "SELECT DISTINCT userid, realname, login_name, " .
"LENGTH(login_name) AS namelength " .
"FROM profiles";
if (&::Param('usevisibilitygroups')) {
$query .= ", user_group_map";
}
- $query .= " WHERE " . $dbh->sql_position($sqlstr,
- "UPPER(login_name)") .
- " OR " . $dbh->sql_position($sqlstr,
- "UPPER(realname)");
+ $query .= " WHERE " .
+ $dbh->sql_position($sqlstr, 'LOWER(login_name)') . " > 0" .
+ " OR " .
+ $dbh->sql_position($sqlstr, 'LOWER(realname)') . " > 0";
if (&::Param('usevisibilitygroups')) {
$query .= " AND user_group_map.user_id = userid" .
" AND isbless = 0" .