[mb-commits] branch, beta, updated. Merge branch 'mbs-5535' into beta MBS-5535, rename clean_text to collapse_whi...
MusicBrainz Git Server <[email protected]>
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TVLSo-0005m3-Ni@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=abf0d060eb2635b71cb07966fc43367b6efa26cf (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=d55fa230fdcb478dc057ee36259048de9f11e21c (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2e6ac22d2513a609c8be781ec6f3a1363cdf1ad3 (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=351416cdc79387ca364e54f247bc1d7a9cbc9656 (commit)
Summary of changes:
lib/MusicBrainz/Server/Data/Utils.pm | 13 ++++-
lib/MusicBrainz/Server/Edit/Utils.pm | 7 ++-
t/lib/t/MusicBrainz/Server/Edit/Utils.pm | 71 ++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+), 5 deletions(-)
create mode 100644 t/lib/t/MusicBrainz/Server/Edit/Utils.pm
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 abf0d060eb2635b71cb07966fc43367b6efa26cf
Merge: 351416c d55fa23
Author: warp <[email protected]>
Date: Mon Nov 5 13:07:25 2012 +0100
Merge branch 'mbs-5535' into beta
* mbs-5535:
MBS-5535, rename clean_text to collapse_whitespace.
MBS-5535, correctly collapse and trim all parts of an artist credit in Edit::Utils::clean_submitted_artist_credits.
commit d55fa230fdcb478dc057ee36259048de9f11e21c
Author: warp <[email protected]>
Date: Mon Nov 5 13:06:54 2012 +0100
MBS-5535, rename clean_text to collapse_whitespace.
diff --git a/lib/MusicBrainz/Server/Data/Utils.pm b/lib/MusicBrainz/Server/Data/Utils.pm
index 03a7e6b..2a697ec 100644
--- a/lib/MusicBrainz/Server/Data/Utils.pm
+++ b/lib/MusicBrainz/Server/Data/Utils.pm
@@ -23,7 +23,7 @@ our @EXPORT_OK = qw(
artist_credit_to_ref
check_data
check_in_use
- clean_text
+ collapse_whitespace
copy_escape
defined_hash
generate_gid
@@ -310,7 +310,7 @@ sub add_partial_date_to_row
}
}
-sub clean_text {
+sub collapse_whitespace {
my $t = shift;
# Compress whitespace
@@ -326,7 +326,7 @@ sub trim {
# Remove leading and trailing space
my $t = Text::Trim::trim (shift);
- return clean_text ($t);
+ return collapse_whitespace ($t);
}
sub type_to_model
diff --git a/lib/MusicBrainz/Server/Edit/Utils.pm b/lib/MusicBrainz/Server/Edit/Utils.pm
index 73edf8c..4bdbe0c 100644
--- a/lib/MusicBrainz/Server/Edit/Utils.pm
+++ b/lib/MusicBrainz/Server/Edit/Utils.pm
@@ -5,7 +5,7 @@ use 5.10.0;
use List::MoreUtils qw( uniq );
-use MusicBrainz::Server::Data::Utils qw( artist_credit_to_ref clean_text trim partial_date_to_hash );
+use MusicBrainz::Server::Data::Utils qw( artist_credit_to_ref collapse_whitespace trim partial_date_to_hash );
use MusicBrainz::Server::Entity::ArtistCredit;
use MusicBrainz::Server::Entity::ArtistCreditName;
use MusicBrainz::Server::Edit::Exceptions;
@@ -188,7 +188,7 @@ sub clean_submitted_artist_credits
# Set to empty string if join_phrase is undef.
$part->{join_phrase} = '' unless defined $part->{join_phrase};
- $part->{join_phrase} = clean_text ($part->{join_phrase});
+ $part->{join_phrase} = collapse_whitespace ($part->{join_phrase});
# Remove trailing whitespace from a trailing join phrase.
$part->{join_phrase} =~ s/\s+$// if $_ == $#names;
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server