aboutsummaryrefslogtreecommitdiffstats
path: root/editversions.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-04-10 09:36:43 +0000
committerlpsolit%gmail.com <>2009-04-10 09:36:43 +0000
commit461d51d5078bd9971593296dbc35d3e37e48df9b (patch)
treeeaf3ebb004f28d3a3e91f6f7f1f9d81cca89bbe6 /editversions.cgi
parentcec56973dd19c6b949d549d30d4375b76de50e27 (diff)
downloadbugs-461d51d5078bd9971593296dbc35d3e37e48df9b.tar
bugs-461d51d5078bd9971593296dbc35d3e37e48df9b.tar.gz
bugs-461d51d5078bd9971593296dbc35d3e37e48df9b.tar.bz2
bugs-461d51d5078bd9971593296dbc35d3e37e48df9b.tar.xz
bugs-461d51d5078bd9971593296dbc35d3e37e48df9b.zip
Bug 471871: Bugzilla::Version has duplicated code compared to Bugzilla::Object (make Bugzilla::Version really a subclass of Bugzilla::Object) - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'editversions.cgi')
-rwxr-xr-xeditversions.cgi7
1 files changed, 5 insertions, 2 deletions
diff --git a/editversions.cgi b/editversions.cgi
index 85f4f8ca4..7e6b9247d 100755
--- a/editversions.cgi
+++ b/editversions.cgi
@@ -119,7 +119,8 @@ if ($action eq 'add') {
if ($action eq 'new') {
check_token_data($token, 'add_version');
- my $version = Bugzilla::Version::create($version_name, $product);
+ my $version = Bugzilla::Version->create(
+ {name => $version_name, product => $product});
delete_token($token);
$vars->{'message'} = 'version_created';
@@ -202,7 +203,8 @@ if ($action eq 'update') {
$dbh->bz_start_transaction();
- $vars->{'updated'} = $version->update($version_name, $product);
+ $version->set_name($version_name);
+ my $changes = $version->update();
$dbh->bz_commit_transaction();
delete_token($token);
@@ -210,6 +212,7 @@ if ($action eq 'update') {
$vars->{'message'} = 'version_updated';
$vars->{'version'} = $version;
$vars->{'product'} = $product;
+ $vars->{'changes'} = $changes;
$template->process("admin/versions/list.html.tmpl", $vars)
|| ThrowTemplateError($template->error());