aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Joshi <joshi_sunil@in.com>2013-09-26 12:04:59 +1000
committerSimon Green <sgreen@redhat.com>2013-09-26 12:04:59 +1000
commit646aa223346440a159effc37b0e6070832b1989a (patch)
treec13d4e15231869126bc3cabb179b006457883017
parent2fe007151dd2d7caec031cd1fca617eac47f2549 (diff)
downloadbugs-646aa223346440a159effc37b0e6070832b1989a.tar
bugs-646aa223346440a159effc37b0e6070832b1989a.tar.gz
bugs-646aa223346440a159effc37b0e6070832b1989a.tar.bz2
bugs-646aa223346440a159effc37b0e6070832b1989a.tar.xz
bugs-646aa223346440a159effc37b0e6070832b1989a.zip
Bug 714523 - editversions.cgi should use ->set_all
r=simon, a=simon
-rw-r--r--Bugzilla/Version.pm10
-rwxr-xr-xeditversions.cgi6
2 files changed, 9 insertions, 7 deletions
diff --git a/Bugzilla/Version.pm b/Bugzilla/Version.pm
index 920853ecd..317b73d95 100644
--- a/Bugzilla/Version.pm
+++ b/Bugzilla/Version.pm
@@ -169,8 +169,8 @@ sub product {
# Validators
################################
-sub set_name { $_[0]->set('value', $_[1]); }
-sub set_is_active { $_[0]->set('isactive', $_[1]); }
+sub set_value { $_[0]->set('value', $_[1]); }
+sub set_isactive { $_[0]->set('isactive', $_[1]); }
sub _check_value {
my ($invocant, $name, undef, $params) = @_;
@@ -219,7 +219,7 @@ Bugzilla::Version - Bugzilla product version class.
my $version = Bugzilla::Version->create(
{ value => $name, product => $product_obj });
- $version->set_name($new_name);
+ $version->set_value($new_name);
$version->update();
$version->remove_from_db;
@@ -255,9 +255,9 @@ below.
=item DEFAULT_VERSION
-=item set_is_active
+=item set_isactive
-=item set_name
+=item set_value
=item product_id
diff --git a/editversions.cgi b/editversions.cgi
index 1d056c67b..06f2f580c 100755
--- a/editversions.cgi
+++ b/editversions.cgi
@@ -188,8 +188,10 @@ if ($action eq 'update') {
$dbh->bz_start_transaction();
- $version->set_name($version_name);
- $version->set_is_active($isactive);
+ $version->set_all({
+ value => $version_name,
+ isactive => $isactive
+ });
my $changes = $version->update();
$dbh->bz_commit_transaction();