summaryrefslogtreecommitdiffstats
path: root/post_bug.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-09-10 11:22:28 +0200
committermkanat%bugzilla.org <>2006-09-10 11:22:28 +0200
commitbb61c992c9c2ff6c9d51ac9fcde5165bf6be7e21 (patch)
treea0095414e9678dc0942d391d0727cd85568a2a36 /post_bug.cgi
parent1a4d88f3293090175276c9b81cfe6727483f7ae8 (diff)
downloadbugzilla-bb61c992c9c2ff6c9d51ac9fcde5165bf6be7e21.tar.gz
bugzilla-bb61c992c9c2ff6c9d51ac9fcde5165bf6be7e21.tar.xz
Bug 351339: Move group insertion out of post_bug.cgi and into Bugzilla::Bug
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'post_bug.cgi')
-rwxr-xr-xpost_bug.cgi10
1 files changed, 1 insertions, 9 deletions
diff --git a/post_bug.cgi b/post_bug.cgi
index e607c6f95..52bd763d7 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -145,8 +145,6 @@ foreach my $group (grep(/^bit-\d+$/, $cgi->param())) {
push(@selected_groups, $1);
}
-my @add_groups = @{Bugzilla::Bug->_check_groups($product, \@selected_groups)};
-
# Include custom fields editable on bug creation.
my @custom_bug_fields = Bugzilla->get_fields(
{ custom => 1, obsolete => 0, enter_bug => 1 });
@@ -185,6 +183,7 @@ foreach my $field (@bug_fields) {
}
$bug_params{'creation_ts'} = $timestamp;
$bug_params{'cc'} = [$cgi->param('cc')];
+$bug_params{'groups'} = \@selected_groups;
# Add the bug report to the DB.
$dbh->bz_lock_tables('bugs WRITE', 'bug_group_map WRITE', 'longdescs WRITE',
@@ -202,13 +201,6 @@ my $bug = Bugzilla::Bug->create(\%bug_params);
# Get the bug ID back.
my $id = $bug->bug_id;
-# Add the group restrictions
-my $sth_addgroup = $dbh->prepare(q{
- INSERT INTO bug_group_map (bug_id, group_id) VALUES (?, ?)});
-foreach my $group_id (@add_groups) {
- $sth_addgroup->execute($id, $group_id);
-}
-
# Add the initial comment, allowing for the fact that it may be private
my $privacy = 0;
if (Bugzilla->params->{"insidergroup"}