From ec610fd673feb6d6e18d121b5e67aa3f87e7f4ea Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Sat, 5 Mar 2005 08:18:47 +0000 Subject: Bug 277782: _throw_error should unlock tables when tables are locked, automatically Patch By Tomas Kopal r=travis, r=LpSolit, a=justdave --- editcomponents.cgi | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'editcomponents.cgi') diff --git a/editcomponents.cgi b/editcomponents.cgi index 12a25905d..d21518fce 100755 --- a/editcomponents.cgi +++ b/editcomponents.cgi @@ -66,7 +66,7 @@ sub CheckProduct ($) # do we have a product? unless ($prod) { - ThrowUserError('product_not_specified'); + ThrowUserError('product_not_specified'); exit; } @@ -585,7 +585,6 @@ if ($action eq 'update') { if ($description ne $descriptionold) { unless ($description) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('component_blank_description', {'name' => $componentold}); exit; @@ -603,7 +602,6 @@ if ($action eq 'update') { my $initialownerid = login_to_id($initialowner); unless ($initialownerid) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('component_need_valid_initialowner', {'name' => $componentold}); exit; @@ -621,7 +619,6 @@ if ($action eq 'update') { if (Param('useqacontact') && $initialqacontact ne $initialqacontactold) { my $initialqacontactid = login_to_id($initialqacontact); if (!$initialqacontactid && $initialqacontact ne '') { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('component_need_valid_initialqacontact', {'name' => $componentold}); exit; @@ -638,13 +635,11 @@ if ($action eq 'update') { if ($component ne $componentold) { unless ($component) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('component_must_have_a_name', {'name' => $componentold}); exit; } if (TestComponent($product, $component)) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('component_already_exists', {'name' => $component}); exit; -- cgit v1.2.3-24-g4f1b