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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
32376317
Commit
32376317
authored
Sep 01, 2000
by
cyeh%bluemartini.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for 45583: all users get added to a group if userregexp is null in editproducts.cgi
patch by jmrobins@tgix.com
parent
f472f34b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
editproducts.cgi
editproducts.cgi
+11
-11
No files found.
editproducts.cgi
View file @
32376317
...
...
@@ -378,18 +378,18 @@ if ($action eq 'new') {
# one by one if they match. Furthermore, I need to do it with two
# separate loops, since opening a new SQL statement to do the update
# seems to clobber the previous one.
SendSQL
(
"SELECT login_name FROM profiles"
);
my
@login_list
=
();
my
$this_login
;
while
(
$this_login
=
FetchOneColumn
())
{
push
@login_list
,
$this_login
;
}
foreach
$this_login
(
@login_list
)
{
if
(
$this_login
=~
/$userregexp/i
)
{
SendSQL
(
"UPDATE profiles "
.
# Modified, 7/17/00, Joe Robins
# If the userregexp is left empty, then no users should be added to
# the bug group. As is, it was adding all users, since they all
# matched the empty pattern.
# In addition, I've replaced the rigamarole I was going through to
# find matching users with a much simpler statement that lets the
# mySQL database do the work.
unless
(
$userregexp
eq
""
)
{
SendSQL
(
"UPDATE profiles "
.
"SET groupset = groupset | "
.
$bit
.
" "
.
"WHERE login_name = "
.
SqlQuote
(
$this_login
));
}
"WHERE LOWER(login_name) REGEXP LOWER("
.
SqlQuote
(
$userregexp
)
.
")"
);
}
}
...
...
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