[mb-commits] branch, mbs-5728, updated. MBS-5728: Make sure that whitespace join phrases are allowed in artist credits
MusicBrainz Git Server <[email protected]> Tue, 29 Jan 2013 12:54:05 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1U0AhR-0002DM-Qi@wiley> |
The branch, mbs-5728 has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2e6b2b4a4e55f14f866ebd0a363cb8ad4689ab3e (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=c382addf3fcf29740e387f58e1fd464fcdfe6a0d (commit)
Summary of changes:
lib/MusicBrainz/Server/Form/Field/ArtistCredit.pm | 10 ++++++++++
1 files changed, 10 insertions(+), 0 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 2e6b2b4a4e55f14f866ebd0a363cb8ad4689ab3e
Author: Oliver Charles <[email protected]>
Date: Tue Jan 29 12:57:27 2013 +0000
MBS-5728: Make sure that whitespace join phrases are allowed in artist credits
diff --git a/lib/MusicBrainz/Server/Form/Field/ArtistCredit.pm b/lib/MusicBrainz/Server/Form/Field/ArtistCredit.pm
index f92d38d..b387ec3 100644
--- a/lib/MusicBrainz/Server/Form/Field/ArtistCredit.pm
+++ b/lib/MusicBrainz/Server/Form/Field/ArtistCredit.pm
@@ -95,6 +95,16 @@ around 'value' => sub {
return $ret unless $ret && $ret->{names};
+ my @names = @{ $ret->{names} };
+ for my $i (0 .. $#names) {
+ if ($self->result->input) {
+ # HTML::FormHandler incorrectly trims the join phrase if
+ # it is a single space, work around this by taking the
+ # join phrase directly from the input here.
+ $ret->{names}->[$i]->{join_phrase} = $self->result->input->{names}->[$i]->{join_phrase};
+ }
+ }
+
return clean_submitted_artist_credits($ret);
};
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server