diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-10-09 21:01:58 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-10-09 21:01:58 +0200 |
commit | b0f9f0819ceaeefa2ed2b4ba028d851d1de6146b (patch) | |
tree | 42c25087002db6cbec187a8f8d6ad111589107df /Bugzilla/Bug.pm | |
parent | fca7f7eda42cecf08252d710a16c4ad001ba204b (diff) | |
parent | f9e41025a332f57b3d9cabed8418e208fbd90400 (diff) | |
download | bugzilla-b0f9f0819ceaeefa2ed2b4ba028d851d1de6146b.tar.gz bugzilla-b0f9f0819ceaeefa2ed2b4ba028d851d1de6146b.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index dcf85d206..68ba98549 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -2891,7 +2891,8 @@ sub add_see_also { # ref bug id for sending changes email. my $ref_bug = delete $field_values->{ref_bug}; if ($class->isa('Bugzilla::BugUrl::Bugzilla::Local') - and !$skip_recursion) + and !$skip_recursion + and $ref_bug->check_can_change_field('see_also', '', $self->id, \$privs)) { $ref_bug->add_see_also($self->id, 'skip_recursion'); push @{ $self->{_update_ref_bugs} }, $ref_bug; @@ -2923,12 +2924,15 @@ sub remove_see_also { # we need to notify changes for that bug too. $removed_bug_url = $removed_bug_url->[0]; if (!$skip_recursion and $removed_bug_url - and $removed_bug_url->isa('Bugzilla::BugUrl::Bugzilla::Local')) + and $removed_bug_url->isa('Bugzilla::BugUrl::Bugzilla::Local') + and $removed_bug_url->ref_bug_url) { my $ref_bug = Bugzilla::Bug->check($removed_bug_url->ref_bug_url->bug_id); - if (Bugzilla->user->can_edit_product($ref_bug->product_id)) { + if (Bugzilla->user->can_edit_product($ref_bug->product_id) + and $ref_bug->check_can_change_field('see_also', $self->id, '', \$privs)) + { my $self_url = $removed_bug_url->local_uri($self->id); $ref_bug->remove_see_also($self_url, 'skip_recursion'); push @{ $self->{_update_ref_bugs} }, $ref_bug; |