diff options
author | mkanat%kerio.com <> | 2005-02-18 05:57:26 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-18 05:57:26 +0000 |
commit | d3f8bf365e5b93f58497a25e07fde7ce30884f9d (patch) | |
tree | ba45ba2aa22039ecd440ca4c5c7fa421eb158456 /editclassifications.cgi | |
parent | Bug 280093 : Update "Add to Sidbar" HTML text and JS addsidebar() function (diff) | |
download | bugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.tar.gz bugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.tar.bz2 bugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.zip |
Bug 280503: Replace "LOCK/UNLOCK TABLES" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=myk
Diffstat (limited to 'editclassifications.cgi')
-rwxr-xr-x | editclassifications.cgi | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/editclassifications.cgi b/editclassifications.cgi index 777e76f75..fd02befef 100755 --- a/editclassifications.cgi +++ b/editclassifications.cgi @@ -205,7 +205,7 @@ if ($action eq 'delete') { } # lock the tables before we start to change everything: - $dbh->do("LOCK TABLES classifications WRITE, products WRITE"); + $dbh->bz_lock_tables('classifications WRITE', 'products WRITE'); # delete $sth = $dbh->prepare("DELETE FROM classifications WHERE id=?"); @@ -217,7 +217,7 @@ if ($action eq 'delete') { WHERE classification_id=?"); $sth->execute($classification_id); - $dbh->do("UNLOCK TABLES"); + $dbh->bz_unlock_tables(); unlink "data/versioncache"; @@ -283,7 +283,7 @@ if ($action eq 'update') { # above so it will remain static even after we rename the # classification in the database. - $dbh->do("LOCK TABLES classifications WRITE"); + $dbh->bz_lock_tables('classifications WRITE'); if ($description ne $descriptionold) { $sth = $dbh->prepare("UPDATE classifications @@ -295,12 +295,12 @@ if ($action eq 'update') { if ($classification ne $classificationold) { unless ($classification) { - $dbh->do("UNLOCK TABLES"); + $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError("classification_not_specified") } if (TestClassification($classification)) { - $dbh->do("UNLOCK TABLES"); + $dbh->bz_unlock_tables(UNLOCK_ABORT); ThrowUserError("classification_already_exists", { name => $classification }); } $sth = $dbh->prepare("UPDATE classifications @@ -308,7 +308,7 @@ if ($action eq 'update') { $sth->execute($classification,$classification_id); $vars->{'updated_classification'} = 1; } - $dbh->do("UNLOCK TABLES"); + $dbh->bz_unlock_tables(); unlink "data/versioncache"; LoadTemplate($action); |