summaryrefslogtreecommitdiffstats
path: root/editproducts.cgi
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-10 17:59:51 +0100
committerDylan William Hardison <dylan@hardison.net>2018-03-10 18:08:36 +0100
commit8ba3f387cd09504cd0ca357b3557d705d044633b (patch)
treef99c82609dc493ba3c288a81a5ba152ae85d947e /editproducts.cgi
parent2056caa180f907c6e5727954547dfd928cf6a360 (diff)
downloadbugzilla-8ba3f387cd09504cd0ca357b3557d705d044633b.tar.gz
bugzilla-8ba3f387cd09504cd0ca357b3557d705d044633b.tar.xz
initial changes, no templates
Diffstat (limited to 'editproducts.cgi')
-rwxr-xr-xeditproducts.cgi26
1 files changed, 18 insertions, 8 deletions
diff --git a/editproducts.cgi b/editproducts.cgi
index a989e4bc1..618aec547 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -158,15 +158,19 @@ if ($action eq 'new') {
check_token_data($token, 'add_product');
my %create_params = (
- classification => $classification_name,
- name => $product_name,
- description => scalar $cgi->param('description'),
- version => scalar $cgi->param('version'),
- defaultmilestone => scalar $cgi->param('defaultmilestone'),
- isactive => scalar $cgi->param('is_active'),
- create_series => scalar $cgi->param('createseries'),
- allows_unconfirmed => scalar $cgi->param('allows_unconfirmed'),
+ classification => $classification_name,
+ name => $product_name,
+ description => scalar $cgi->param('description'),
+ version => scalar $cgi->param('version'),
+ defaultmilestone => scalar $cgi->param('defaultmilestone'),
+ isactive => scalar $cgi->param('is_active'),
+ create_series => scalar $cgi->param('createseries'),
+ allows_unconfirmed => scalar $cgi->param('allows_unconfirmed'),
+ default_platform_id => scalar $cgi->param('default_platform_id'),
+ default_op_sys_id => scalar $cgi->param('default_op_sys_id'),
+ security_group_id => scalar $cgi->param('security_group_id'),
);
+
my $product = Bugzilla::Product->create(\%create_params);
delete_token($token);
@@ -279,6 +283,12 @@ if ($action eq 'update') {
default_milestone => scalar $cgi->param('defaultmilestone'),
});
+ foreach my $field (qw( default_platform_id default_op_sys_id security_group_id )) {
+ my $value = $cgi->param($field);
+ detaint_natural($value);
+ $product->set($field, $value);
+ }
+
my $changes = $product->update();
delete_token($token);