summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-16 00:22:55 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-02-16 00:22:55 +0100
commit120b63d507a3316666b25494bc890a024948aef8 (patch)
tree0a96e60d6316cc8471b066def8b1e1273f38e4ab /editproducts.cgi
parent7802dbcf7bedcc09e5f1052ceb1ba82347a124b7 (diff)
downloadbugzilla-120b63d507a3316666b25494bc890a024948aef8.tar.gz
bugzilla-120b63d507a3316666b25494bc890a024948aef8.tar.xz
Bug 372979: Make voting into an extension
r=mkanat, a=mkanat, a=LpSolit
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-xeditproducts.cgi22
1 files changed, 7 insertions, 15 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index 8433ed16b..4a302aa6c 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -186,11 +186,6 @@ if ($action eq 'new') {
create_series => scalar $cgi->param('createseries'),
allows_unconfirmed => scalar $cgi->param('allows_unconfirmed'),
);
- if (Bugzilla->params->{'usevotes'}) {
- $create_params{votesperuser} = $cgi->param('votesperuser');
- $create_params{maxvotesperbug} = $cgi->param('maxvotesperbug');
- $create_params{votestoconfirm} = $cgi->param('votestoconfirm');
- }
my $product = Bugzilla::Product->create(\%create_params);
delete_token($token);
@@ -295,16 +290,13 @@ if ($action eq 'update') {
my $product_old_name = trim($cgi->param('product_old_name') || '');
my $product = $user->check_can_admin_product($product_old_name);
- $product->set_name($product_name);
- $product->set_description(scalar $cgi->param('description'));
- $product->set_default_milestone(scalar $cgi->param('defaultmilestone'));
- $product->set_is_active(scalar $cgi->param('is_active'));
- if (Bugzilla->params->{'usevotes'}) {
- $product->set_votes_per_user(scalar $cgi->param('votesperuser'));
- $product->set_votes_per_bug(scalar $cgi->param('maxvotesperbug'));
- $product->set_votes_to_confirm(scalar $cgi->param('votestoconfirm'));
- }
- $product->set_allows_unconfirmed(scalar $cgi->param('allows_unconfirmed'));
+ $product->set_all({
+ name => $product_name,
+ description => scalar $cgi->param('description'),
+ is_active => scalar $cgi->param('is_active'),
+ allows_unconfirmed => scalar $cgi->param('allows_unconfirmed'),
+ default_milestone => scalar $cgi->param('defaultmilestone'),
+ });
my $changes = $product->update();