summaryrefslogtreecommitdiffstats
path: root/editversions.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-08-24 04:31:19 +0200
committermkanat%bugzilla.org <>2007-08-24 04:31:19 +0200
commit845aacfb3652a18ef12828628e68180591f6baf6 (patch)
tree32f462212ee80be748c073f221489d4a935f1aea /editversions.cgi
parentd721954afb4458f240d3be8e020c619c57c9c1ed (diff)
downloadbugzilla-845aacfb3652a18ef12828628e68180591f6baf6.tar.gz
bugzilla-845aacfb3652a18ef12828628e68180591f6baf6.tar.xz
Bug 373440: Make "check" into a generic function in Bugzilla::Object
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'editversions.cgi')
-rwxr-xr-xeditversions.cgi17
1 files changed, 8 insertions, 9 deletions
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');