summaryrefslogtreecommitdiffstats
path: root/userprefs.cgi
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-18 06:57:26 +0100
committermkanat%kerio.com <>2005-02-18 06:57:26 +0100
commitd3f8bf365e5b93f58497a25e07fde7ce30884f9d (patch)
treeba45ba2aa22039ecd440ca4c5c7fa421eb158456 /userprefs.cgi
parentf95d1faba79c94bcf3bf936334d6bb10e03c93b2 (diff)
downloadbugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.tar.gz
bugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.tar.xz
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 'userprefs.cgi')
-rwxr-xr-xuserprefs.cgi7
1 files changed, 4 insertions, 3 deletions
diff --git a/userprefs.cgi b/userprefs.cgi
index f62f02500..193a4d73f 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -195,7 +195,8 @@ sub DoEmail {
sub SaveEmail {
my $updateString = "";
my $cgi = Bugzilla->cgi;
-
+ my $dbh = Bugzilla->dbh;
+
if (defined $cgi->param('ExcludeSelf')) {
$updateString .= 'ExcludeSelf~on';
} else {
@@ -226,7 +227,7 @@ sub SaveEmail {
# we don't really care if anyone reads the watch table. So
# some small amount of contention could be gotten rid of by
# using user-defined locks rather than table locking.
- SendSQL("LOCK TABLES watch WRITE, profiles READ");
+ $dbh->bz_lock_tables('watch WRITE', 'profiles READ');
# what the db looks like now
my $origWatchedUsers = new Bugzilla::RelationSet;
@@ -244,7 +245,7 @@ sub SaveEmail {
($CCDELTAS[0] eq "") || SendSQL($CCDELTAS[0]);
($CCDELTAS[1] eq "") || SendSQL($CCDELTAS[1]);
- SendSQL("UNLOCK TABLES");
+ $dbh->bz_unlock_tables();
}
}