diff options
author | Simon Green <sgreen@redhat.com> | 2014-08-10 17:49:30 +1000 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-08-10 17:49:30 +1000 |
commit | 2863a6679fe69c46f1de515d001eb0dd696e5977 (patch) | |
tree | f79040d23a6619054c8f1c30cce43adaa97792e8 /Bugzilla/DB.pm | |
parent | f4b9806c5ab5e63383269ef328643145ade66004 (diff) | |
download | bugs-2863a6679fe69c46f1de515d001eb0dd696e5977.tar bugs-2863a6679fe69c46f1de515d001eb0dd696e5977.tar.gz bugs-2863a6679fe69c46f1de515d001eb0dd696e5977.tar.bz2 bugs-2863a6679fe69c46f1de515d001eb0dd696e5977.tar.xz bugs-2863a6679fe69c46f1de515d001eb0dd696e5977.zip |
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.pm | 4 |
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'); } |