summaryrefslogtreecommitdiffstats
path: root/editcomponents.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 /editcomponents.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 'editcomponents.cgi')
-rwxr-xr-xeditcomponents.cgi7
1 files changed, 1 insertions, 6 deletions
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;