summaryrefslogtreecommitdiffstats
path: root/editmilestones.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-03-05 09:18:47 +0100
committermkanat%kerio.com <>2005-03-05 09:18:47 +0100
commitec610fd673feb6d6e18d121b5e67aa3f87e7f4ea (patch)
treeb1d6fe9b10b89a30e2b1932d050d5678362f638a /editmilestones.cgi
parente4b8b770b0229a0761a3ef5116c7fcad4e5352d5 (diff)
downloadbugzilla-ec610fd673feb6d6e18d121b5e67aa3f87e7f4ea.tar.gz
bugzilla-ec610fd673feb6d6e18d121b5e67aa3f87e7f4ea.tar.xz
Bug 277782: _throw_error should unlock tables when tables are locked, automatically
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=travis, r=LpSolit, a=justdave
Diffstat (limited to 'editmilestones.cgi')
-rwxr-xr-xeditmilestones.cgi11
1 files changed, 3 insertions, 8 deletions
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});