From 845aacfb3652a18ef12828628e68180591f6baf6 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 24 Aug 2007 02:31:19 +0000 Subject: Bug 373440: Make "check" into a generic function in Bugzilla::Object Patch By Max Kanat-Alexander r=LpSolit, a=LpSolit --- editversions.cgi | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'editversions.cgi') diff --git a/editversions.cgi b/editversions.cgi index 7bda6215d..54f87457b 100755 --- a/editversions.cgi +++ b/editversions.cgi @@ -147,9 +147,8 @@ if ($action eq 'new') { # if ($action eq 'del') { - - my $version = Bugzilla::Version::check_version($product, $version_name); - + my $version = Bugzilla::Version->check({ product => $product, + name => $version_name }); $vars->{'version'} = $version; $vars->{'product'} = $product; $vars->{'token'} = issue_session_token('delete_version'); @@ -167,7 +166,8 @@ if ($action eq 'del') { if ($action eq 'delete') { check_token_data($token, 'delete_version'); - my $version = Bugzilla::Version::check_version($product, $version_name); + my $version = Bugzilla::Version->check({ product => $product, + name => $version_name }); $version->remove_from_db; delete_token($token); @@ -189,9 +189,8 @@ if ($action eq 'delete') { # if ($action eq 'edit') { - - my $version = Bugzilla::Version::check_version($product, $version_name); - + my $version = Bugzilla::Version->check({ product => $product, + name => $version_name }); $vars->{'version'} = $version; $vars->{'product'} = $product; $vars->{'token'} = issue_session_token('edit_version'); @@ -211,8 +210,8 @@ if ($action eq 'edit') { if ($action eq 'update') { check_token_data($token, 'edit_version'); my $version_old_name = trim($cgi->param('versionold') || ''); - my $version = - Bugzilla::Version::check_version($product, $version_old_name); + my $version = Bugzilla::Version->check({ product => $product, + name => $version_old_name }); $dbh->bz_lock_tables('bugs WRITE', 'versions WRITE'); -- cgit v1.2.3-24-g4f1b