diff options
Diffstat (limited to 'Bugzilla/Search')
-rw-r--r-- | Bugzilla/Search/Saved.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Bugzilla/Search/Saved.pm b/Bugzilla/Search/Saved.pm index bcc72cffe..3484eb3bc 100644 --- a/Bugzilla/Search/Saved.pm +++ b/Bugzilla/Search/Saved.pm @@ -97,13 +97,12 @@ sub create { Bugzilla->login(LOGIN_REQUIRED); my $dbh = Bugzilla->dbh; $class->check_required_create_fields(@_); + $dbh->bz_start_transaction(); my $params = $class->run_create_validators(@_); # Right now you can only create a Saved Search for the current user. $params->{userid} = Bugzilla->user->id; - $dbh->bz_lock_tables('namedqueries WRITE', - 'namedqueries_link_in_footer WRITE'); my $lif = delete $params->{link_in_footer}; my $obj = $class->insert_create_data($params); if ($lif) { @@ -111,7 +110,7 @@ sub create { (user_id, namedquery_id) VALUES (?,?)', undef, $params->{userid}, $obj->id); } - $dbh->bz_unlock_tables(); + $dbh->bz_commit_transaction(); return $obj; } |