summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-10-11 23:42:22 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2013-10-11 23:42:22 +0200
commitc88c3c0a5582284e5f72252b4742eebb5a1c895a (patch)
tree3ac6b095e4a27031fdca06b2148510b5e0b90ad3 /Bugzilla/Bug.pm
parent2516718aec9fe1a005f15e99b459ca092d0f9970 (diff)
downloadbugzilla-c88c3c0a5582284e5f72252b4742eebb5a1c895a.tar.gz
bugzilla-c88c3c0a5582284e5f72252b4742eebb5a1c895a.tar.xz
Fixes on checkin for bug 769134
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 3000bd0ae..2c0d458e7 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -2541,6 +2541,7 @@ sub _set_product {
my @idlist = ($self->id);
push(@idlist, map {$_->id} @{ $params->{other_bugs} })
if $params->{other_bugs};
+ @idlist = uniq @idlist;
# Get the ID of groups which are no longer valid in the new product.
my $gids = $dbh->selectcol_arrayref(
'SELECT bgm.group_id
@@ -2555,13 +2556,13 @@ sub _set_product {
. Bugzilla->user->groups_as_string . '))
OR gcm.othercontrol != ?) )',
undef, (@idlist, $product->id, CONTROLMAPNA, CONTROLMAPNA));
- $vars{'old_groups'} = Bugzilla::Group->new_from_list($gids);
+ $vars{'old_groups'} = Bugzilla::Group->new_from_list($gids);
# Did we come here from editing multiple bugs? (affects how we
# show optional group changes)
- $vars{multiple_bugs} = Bugzilla->cgi->param('id') ? 0 : 1;
+ $vars{multiple_bugs} = (@idlist > 1) ? 1 : 0;
}
-
+
if (%vars) {
$vars{product} = $product;
$vars{bug} = $self;