Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
b180075f
Commit
b180075f
authored
Apr 08, 2009
by
lpsolit%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Back out bug 440259. PostgreSQL fails
parent
1bf19de1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
User.pm
Bugzilla/User.pm
+10
-6
No files found.
Bugzilla/User.pm
View file @
b180075f
...
...
@@ -1017,7 +1017,7 @@ sub match {
if
(
$wildstr
=~
s/\*/\%/g
)
{
# don't do wildcards if no '*' in the string
# Build the query.
trick_taint
(
$wildstr
);
my
$query
=
"SELECT DISTINCT
userid
FROM profiles "
;
my
$query
=
"SELECT DISTINCT
login_name
FROM profiles "
;
if
(
Bugzilla
->
params
->
{
'usevisibilitygroups'
})
{
$query
.=
"INNER JOIN user_group_map
ON user_group_map.user_id = profiles.userid "
;
...
...
@@ -1036,8 +1036,10 @@ sub match {
# Execute the query, retrieve the results, and make them into
# User objects.
my
$user_ids
=
$dbh
->
selectcol_arrayref
(
$query
,
undef
,
(
$wildstr
,
$wildstr
));
@users
=
@
{
Bugzilla::
User
->
new_from_list
(
$user_ids
)};
my
$user_logins
=
$dbh
->
selectcol_arrayref
(
$query
,
undef
,
(
$wildstr
,
$wildstr
));
foreach
my
$login_name
(
@$user_logins
)
{
push
(
@users
,
new
Bugzilla::
User
({
name
=>
$login_name
}));
}
}
else
{
# try an exact match
# Exact matches don't care if a user is disabled.
...
...
@@ -1053,7 +1055,7 @@ sub match {
if
(
!
scalar
(
@users
)
&&
length
(
$str
)
>=
3
)
{
trick_taint
(
$str
);
my
$query
=
"SELECT DISTINCT
userid
FROM profiles "
;
my
$query
=
"SELECT DISTINCT
login_name
FROM profiles "
;
if
(
Bugzilla
->
params
->
{
'usevisibilitygroups'
})
{
$query
.=
"INNER JOIN user_group_map
ON user_group_map.user_id = profiles.userid "
;
...
...
@@ -1070,8 +1072,10 @@ sub match {
$query
.=
" ORDER BY login_name "
;
$query
.=
$dbh
->
sql_limit
(
$limit
)
if
$limit
;
my
$user_ids
=
$dbh
->
selectcol_arrayref
(
$query
,
undef
,
(
$str
,
$str
));
@users
=
@
{
Bugzilla::
User
->
new_from_list
(
$user_ids
)};
my
$user_logins
=
$dbh
->
selectcol_arrayref
(
$query
,
undef
,
(
$str
,
$str
));
foreach
my
$login_name
(
@$user_logins
)
{
push
(
@users
,
new
Bugzilla::
User
({
name
=>
$login_name
}));
}
}
return
\
@users
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment