summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB.pm
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-08-10 09:49:30 +0200
committerSimon Green <sgreen@redhat.com>2014-08-10 09:49:30 +0200
commit2863a6679fe69c46f1de515d001eb0dd696e5977 (patch)
treef79040d23a6619054c8f1c30cce43adaa97792e8 /Bugzilla/DB.pm
parentf4b9806c5ab5e63383269ef328643145ade66004 (diff)
downloadbugzilla-2863a6679fe69c46f1de515d001eb0dd696e5977.tar.gz
bugzilla-2863a6679fe69c46f1de515d001eb0dd696e5977.tar.xz
Bug 448574 - Let $dbh->bz_commit_transaction send emails which are generated during a transaction
r=dkl, a=sgreen
Diffstat (limited to 'Bugzilla/DB.pm')
-rw-r--r--Bugzilla/DB.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index df84d9c79..003629011 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -16,6 +16,7 @@ use DBI;
use parent -norequire, qw(DBI::db);
use Bugzilla::Constants;
+use Bugzilla::Mailer;
use Bugzilla::Install::Requirements;
use Bugzilla::Install::Util qw(install_string);
use Bugzilla::Install::Localconfig;
@@ -1209,12 +1210,13 @@ sub bz_start_transaction {
sub bz_commit_transaction {
my ($self) = @_;
-
+
if ($self->{private_bz_transaction_count} > 1) {
$self->{private_bz_transaction_count}--;
} elsif ($self->bz_in_transaction) {
$self->commit();
$self->{private_bz_transaction_count} = 0;
+ Bugzilla::Mailer->send_staged_mail();
} else {
ThrowCodeError('not_in_transaction');
}