summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2002-11-05 06:55:10 +0100
committerbugreport%peshkin.net <>2002-11-05 06:55:10 +0100
commit807d3057ff10203f9041f0ead7763e05e6e85184 (patch)
tree573a02a2c240e7121ec47eabe721fadd6769934c /Bugzilla
parentad239c56e07db95abb7d0bf911c17c9fb68e8194 (diff)
downloadbugzilla-807d3057ff10203f9041f0ead7763e05e6e85184.tar.gz
bugzilla-807d3057ff10203f9041f0ead7763e05e6e85184.tar.xz
Bug 177436 User matching shouldn't be case-sensitive
patch by not_erik 2xr=justdave a=justdave for 2.17.1
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/User.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 7b167d0c0..1506e5dde 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -90,7 +90,7 @@ sub match {
return \@users if $str =~ /^\s*$/;
- # The search order is wildcards, then exact match, then INSTR search.
+ # The search order is wildcards, then exact match, then substring search.
# Wildcard matching is skipped if there is no '*', and exact matches will
# not (?) have a '*' in them. If any search comes up with something, the
# ones following it will not execute.
@@ -134,19 +134,19 @@ sub match {
&::PopGlobalSQLState();
}
- # then try instr
+ # then try substring search
if ((scalar(@users) == 0)
&& (&::Param('usermatchmode') eq 'search')
&& (length($str) >= 3))
{
- my $sqlstr = &::SqlQuote($str);
+ my $sqlstr = &::SqlQuote(uc($str));
my $query = "SELECT userid, realname, login_name " .
"FROM profiles " .
- "WHERE (INSTR(login_name, $sqlstr) " .
- "OR INSTR(realname, $sqlstr)) ";
+ "WHERE (INSTR(UPPER(login_name), $sqlstr) " .
+ "OR INSTR(UPPER(realname), $sqlstr)) ";
$query .= "AND disabledtext = '' " if $exclude_disabled;
$query .= "ORDER BY length(login_name) ";
$query .= "LIMIT $limit " if $limit;