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
9a5f5918
Commit
9a5f5918
authored
Jan 13, 2014
by
Damien Nozay
Committed by
Dave Lawrence
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 904467 - error when %recipients is empty (e.g. after bugmail_recipients empties it)
r/a=glob
parent
cf84d586
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
BugMail.pm
Bugzilla/BugMail.pm
+17
-14
No files found.
Bugzilla/BugMail.pm
View file @
9a5f5918
...
...
@@ -186,21 +186,24 @@ sub Send {
{
bug
=>
$bug
,
recipients
=>
\%
recipients
,
users
=>
\%
user_cache
,
diffs
=>
\
@diffs
});
# Find all those user-watching anyone on the current list, who is not
# on it already themselves.
my
$involved
=
join
(
","
,
keys
%
recipients
);
my
$userwatchers
=
$dbh
->
selectall_arrayref
(
"SELECT watcher, watched FROM watch
WHERE watched IN ($involved)"
);
# Mark these people as having the role of the person they are watching
foreach
my
$watch
(
@$userwatchers
)
{
while
(
my
(
$role
,
$bits
)
=
each
%
{
$recipients
{
$watch
->
[
1
]}})
{
$recipients
{
$watch
->
[
0
]}
->
{
$role
}
|=
BIT_WATCHING
if
$bits
&
BIT_DIRECT
;
# We should not assume %recipients to have any entries.
if
(
scalar
keys
%
recipients
)
{
# Find all those user-watching anyone on the current list, who is not
# on it already themselves.
my
$involved
=
join
(
","
,
keys
%
recipients
);
my
$userwatchers
=
$dbh
->
selectall_arrayref
(
"SELECT watcher, watched FROM watch
WHERE watched IN ($involved)"
);
# Mark these people as having the role of the person they are watching
foreach
my
$watch
(
@$userwatchers
)
{
while
(
my
(
$role
,
$bits
)
=
each
%
{
$recipients
{
$watch
->
[
1
]}})
{
$recipients
{
$watch
->
[
0
]}
->
{
$role
}
|=
BIT_WATCHING
if
$bits
&
BIT_DIRECT
;
}
push
(
@
{
$watching
{
$watch
->
[
0
]}},
$watch
->
[
1
]);
}
push
(
@
{
$watching
{
$watch
->
[
0
]}},
$watch
->
[
1
]);
}
# Global watcher
...
...
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