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
e76030a3
Commit
e76030a3
authored
9 years ago
by
Gervase Markham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make editusers.cgi list users properly when is_enabled is not defined. r=LpSolit, a=simon
parent
ea25c5cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
editusers.cgi
editusers.cgi
+4
-2
No files found.
editusers.cgi
View file @
e76030a3
...
@@ -70,7 +70,8 @@ if ($action eq 'search') {
...
@@ -70,7 +70,8 @@ if ($action eq 'search') {
my
$matchstr
=
trim
(
$cgi
->
param
(
'matchstr'
));
my
$matchstr
=
trim
(
$cgi
->
param
(
'matchstr'
));
my
$matchtype
=
$cgi
->
param
(
'matchtype'
);
my
$matchtype
=
$cgi
->
param
(
'matchtype'
);
my
$grouprestrict
=
$cgi
->
param
(
'grouprestrict'
)
||
'0'
;
my
$grouprestrict
=
$cgi
->
param
(
'grouprestrict'
)
||
'0'
;
my
$is_enabled
=
scalar
$cgi
->
param
(
'is_enabled'
);
# 0 = disabled only, 1 = enabled only, 2 = everyone
my
$is_enabled
=
$cgi
->
param
(
'is_enabled'
)
//
2
;
my
$query
=
'SELECT DISTINCT userid, login_name, realname, is_enabled, '
.
my
$query
=
'SELECT DISTINCT userid, login_name, realname, is_enabled, '
.
$dbh
->
sql_date_format
(
'last_seen_date'
,
'%Y-%m-%d'
)
.
' AS last_seen_date '
.
$dbh
->
sql_date_format
(
'last_seen_date'
,
'%Y-%m-%d'
)
.
' AS last_seen_date '
.
'FROM profiles'
;
'FROM profiles'
;
...
@@ -163,11 +164,12 @@ if ($action eq 'search') {
...
@@ -163,11 +164,12 @@ if ($action eq 'search') {
}
}
detaint_natural
(
$is_enabled
);
detaint_natural
(
$is_enabled
);
if
(
$is_enabled
==
0
||
$is_enabled
==
1
)
{
if
(
$is_enabled
&&
(
$is_enabled
==
0
||
$is_enabled
==
1
)
)
{
$query
.=
" $nextCondition profiles.is_enabled = ?"
;
$query
.=
" $nextCondition profiles.is_enabled = ?"
;
$nextCondition
=
'AND'
;
$nextCondition
=
'AND'
;
push
(
@bindValues
,
$is_enabled
);
push
(
@bindValues
,
$is_enabled
);
}
}
$query
.=
' ORDER BY profiles.login_name'
;
$query
.=
' ORDER BY profiles.login_name'
;
$vars
->
{
'users'
}
=
$dbh
->
selectall_arrayref
(
$query
,
$vars
->
{
'users'
}
=
$dbh
->
selectall_arrayref
(
$query
,
...
...
This diff is collapsed.
Click to expand it.
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