From c88c3c0a5582284e5f72252b4742eebb5a1c895a Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Fri, 11 Oct 2013 23:42:22 +0200 Subject: Fixes on checkin for bug 769134 --- Bugzilla/Bug.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Bug.pm') 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; -- cgit v1.2.3-24-g4f1b