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 --- editmilestones.cgi | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'editmilestones.cgi') diff --git a/editmilestones.cgi b/editmilestones.cgi index 7364d4d06..7317e7220 100755 --- a/editmilestones.cgi +++ b/editmilestones.cgi @@ -59,14 +59,14 @@ sub CheckProduct ($) # do we have a product? unless ($product) { - &::ThrowUserError('product_not_specified'); + ThrowUserError('product_not_specified'); exit; } # Does it exist in the DB? unless (TestProduct $product) { - &::ThrowUserError('product_doesnt_exist', - {'product' => $product}); + ThrowUserError('product_doesnt_exist', + {'product' => $product}); exit; } } @@ -506,12 +506,9 @@ if ($action eq 'update') { my $stored_sortkey = $sortkey; if ($sortkey != $sortkeyold) { if (!detaint_natural($sortkey)) { - - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('milestone_sortkey_invalid', {'name' => $milestone, 'sortkey' => $stored_sortkey}); - exit; } @@ -532,12 +529,10 @@ if ($action eq 'update') { if ($milestone ne $milestoneold) { unless ($milestone) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('milestone_blank_name'); exit; } if (TestMilestone($product, $milestone)) { - $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError('milestone_already_exists', {'name' => $milestone, 'product' => $product}); -- cgit v1.2.3-24-g4f1b