diff options
author | rojanu <aliustek@gmail.com> | 2011-10-15 15:07:04 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2011-10-15 15:07:04 +0200 |
commit | ef4e19c923d37a5bb1b2f8fdf5bda3ee9e138b16 (patch) | |
tree | 6dbf8c2ea71b77d3aee96e76d88ffc5693795ac9 /editvalues.cgi | |
parent | Bug 674416: Custom searches in query.cgi are lost when clicking the "Back" bu... (diff) | |
download | bugzilla-ef4e19c923d37a5bb1b2f8fdf5bda3ee9e138b16.tar.gz bugzilla-ef4e19c923d37a5bb1b2f8fdf5bda3ee9e138b16.tar.bz2 bugzilla-ef4e19c923d37a5bb1b2f8fdf5bda3ee9e138b16.zip |
Bug 686630: editvalues.cgi should use set_all()
r/a=mkanat
Diffstat (limited to 'editvalues.cgi')
-rwxr-xr-x | editvalues.cgi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/editvalues.cgi b/editvalues.cgi index 1a8d89531..b06ec63bc 100755 --- a/editvalues.cgi +++ b/editvalues.cgi @@ -181,12 +181,15 @@ if ($action eq 'edit') { if ($action eq 'update') { check_token_data($token, 'edit_field_value'); $vars->{'value_old'} = $value->name; + my %params = ( + name => scalar $cgi->param('value_new'), + sortkey => scalar $cgi->param('sortkey'), + visibility_value => scalar $cgi->param('visibility_value_id'), + ); if ($cgi->should_set('is_active')) { - $value->set_is_active($cgi->param('is_active')); + params{is_active} = $cgi->param('is_active'); } - $value->set_name($cgi->param('value_new')); - $value->set_sortkey($cgi->param('sortkey')); - $value->set_visibility_value($cgi->param('visibility_value_id')); + $value->set_all(\%params); $vars->{'changes'} = $value->update(); delete_token($token); $vars->{'message'} = 'field_value_updated'; |