[mb-commits] branch, beta, updated. MBS-5666: revert my fix of MBS-5666 due to controversy
MusicBrainz Git Server <[email protected]> Mon, 04 Feb 2013 23:08:44 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1U2V9Y-0001VM-Ku@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=1b89c8702d637f98367bf9516e17dc7de79be2b4 (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=53a71bd8b7ec5d3b3224379d0474dc9b99f3a328 (commit)
Summary of changes:
lib/MusicBrainz/Server/Data/EditNote.pm | 4 +++-
t/lib/t/MusicBrainz/Server/Data/EditNote.pm | 5 +----
2 files changed, 4 insertions(+), 5 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1b89c8702d637f98367bf9516e17dc7de79be2b4
Author: Ian McEwen <[email protected]>
Date: Mon Feb 4 19:20:09 2013 -0700
MBS-5666: revert my fix of MBS-5666 due to controversy
diff --git a/lib/MusicBrainz/Server/Data/EditNote.pm b/lib/MusicBrainz/Server/Data/EditNote.pm
index 87dc696..f3e936d 100644
--- a/lib/MusicBrainz/Server/Data/EditNote.pm
+++ b/lib/MusicBrainz/Server/Data/EditNote.pm
@@ -90,7 +90,9 @@ sub add_note
map { $_->id } grep { $_->preferences->email_on_notes }
map { $editors->{$_->editor_id} }
@{ $edit->edit_notes },
- (grep { $_->vote != $VOTE_ABSTAIN } @{ $edit->votes }),
+ (grep { my $editor = $_->editor_id;
+ !(grep { $editor == $_ } (53705, 326637, 295208)) || $_->vote != $VOTE_ABSTAIN
+ } @{ $edit->votes }),
$edit;
my $from = $editors->{ $note_hash->{editor_id} };
diff --git a/t/lib/t/MusicBrainz/Server/Data/EditNote.pm b/t/lib/t/MusicBrainz/Server/Data/EditNote.pm
index 9a15e75..6f1e512 100644
--- a/t/lib/t/MusicBrainz/Server/Data/EditNote.pm
+++ b/t/lib/t/MusicBrainz/Server/Data/EditNote.pm
@@ -127,14 +127,11 @@ $test->c->sql->commit;
# Test adding edit notes with email sending
$test->c->model('Vote')->enter_votes(2, { edit_id => $edit->id, vote => 1 });
-# Add an abstain -- this should *not* send email
-$test->c->model('Vote')->enter_votes(4, { edit_id => $edit->id, vote => -1 });
-
$en_data->add_note($edit->id, { text => "This is my note!", editor_id => 3 });
my $server = DBDefs->WEB_SERVER_USED_IN_EMAIL;
my $email_transport = MusicBrainz::Server::Email->get_test_transport;
-is($email_transport->delivery_count, 2, 'Exactly two emails sent (none for an abstain)');
+is($email_transport->delivery_count, 2, 'Exactly two emails sent');
my $email2 = $email_transport->shift_deliveries->{email};
my $email = $email_transport->shift_deliveries->{email};
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server