[mb-commits] branch, beta, updated. Merge remote-tracking branch 'freso/MBS-5504' into beta Fix standardisation o...
MusicBrainz Git Server <[email protected]>
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TUWW3-0004rp-7u@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2d8bf6fe9eb1ea9fbbdefc1f9dd174d3f41dd6e8 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=5f053fceb9a46838c22b9a7b80ab62a34be459d0 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=26fa25d0bdd5671ed22036c921a42c24003c8e82 (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=4ee0f2f65f57f2876a6893c001ca0f202c92a310 (commit)
Summary of changes:
lib/MusicBrainz/Server/Data/URL.pm | 1 +
.../Server/Entity/URL/{Trove.pm => DHHU.pm} | 4 ++--
root/components/common-macros.tt | 1 +
root/static/images/favicons/dhhu-16.png | Bin 0 -> 897 bytes
root/static/scripts/edit/MB/Control/URLCleanup.js | 4 +++-
root/static/scripts/tests/Control/URLCleanup.js | 14 ++++++++++++++
root/static/styles/layout.css | 4 ++++
7 files changed, 25 insertions(+), 3 deletions(-)
copy lib/MusicBrainz/Server/Entity/URL/{Trove.pm => DHHU.pm} (93%)
create mode 100644 root/static/images/favicons/dhhu-16.png
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 2d8bf6fe9eb1ea9fbbdefc1f9dd174d3f41dd6e8
Merge: 4ee0f2f 5f053fc
Author: Ian McEwen <[email protected]>
Date: Fri Nov 2 22:43:17 2012 -0700
Merge remote-tracking branch 'freso/MBS-5504' into beta
commit 5f053fceb9a46838c22b9a7b80ab62a34be459d0
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Wed Oct 24 18:53:53 2012 +0200
Fix standardisation of dhhu.dk URLs. (MBS-5504)
diff --git a/root/static/scripts/edit/MB/Control/URLCleanup.js b/root/static/scripts/edit/MB/Control/URLCleanup.js
index eecfa14..342bf3b 100644
--- a/root/static/scripts/edit/MB/Control/URLCleanup.js
+++ b/root/static/scripts/edit/MB/Control/URLCleanup.js
@@ -387,7 +387,7 @@ MB.constants.CLEANUPS = {
//Standardising RIC
url = url.replace(/^(?:https?:\/\/)?(wiki|www)\.rockinchina\.com\/w\/(.*)+$/, "http://www.rockinchina.com/w/$2");
//Standardising DHHU
- url = url.replace(/^(?:https?:\/\/)?(wiki|www)\.dhhu\.dk\/w\/(.*)+$/, "http://www.dhhu.dk/w/$2");
+ url = url.replace(/^(?:https?:\/\/)?(www\.)?dhhu\.dk\/w\/(.*)+$/, "http://www.dhhu.dk/w/$2");
return url;
}
}
commit 26fa25d0bdd5671ed22036c921a42c24003c8e82
Author: Frederik "Freso" S. Olesen <[email protected]>
Date: Wed Oct 24 18:39:59 2012 +0200
MBS-5504: Add "DHHU" to the "Other Databases" whitelist.
diff --git a/lib/MusicBrainz/Server/Data/URL.pm b/lib/MusicBrainz/Server/Data/URL.pm
index 7494ec5..ae59cff 100644
--- a/lib/MusicBrainz/Server/Data/URL.pm
+++ b/lib/MusicBrainz/Server/Data/URL.pm
@@ -20,6 +20,7 @@ my %URL_SPECIALIZATIONS = (
'BBCMusic' => qr{^https?://(?:www.)?bbc.co.uk/music/}i,
'Canzone' => qr{^https?://(?:www.)?discografia.dds.it/}i,
'CDBaby' => qr{^https?://(?:www.)?cdbaby.com/}i,
+ 'DHHU' => qr{^https?://(?:www.)?dhhu.dk/}i,
'Discogs' => qr{^https?://(?:www.)?discogs.com/}i,
'DiscosDoBrasil' => qr{^https?://(?:www.)?discosdobrasil.com.br/}i,
'Encyclopedisque' => qr{^https?://(?:www.)?encyclopedisque.fr/}i,
diff --git a/lib/MusicBrainz/Server/Entity/URL/DHHU.pm b/lib/MusicBrainz/Server/Entity/URL/DHHU.pm
new file mode 100644
index 0000000..1d9f777
--- /dev/null
+++ b/lib/MusicBrainz/Server/Entity/URL/DHHU.pm
@@ -0,0 +1,36 @@
+package MusicBrainz::Server::Entity::URL::DHHU;
+
+use Moose;
+
+extends 'MusicBrainz::Server::Entity::URL';
+with 'MusicBrainz::Server::Entity::URL::Sidebar';
+
+sub sidebar_name {
+ my $self = shift;
+
+ return "DHHU";
+}
+
+__PACKAGE__->meta->make_immutable;
+no Moose;
+1;
+
+=head1 COPYRIGHT
+
+Copyright (C) 2012 MetaBrainz Foundation
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+=cut
diff --git a/root/components/common-macros.tt b/root/components/common-macros.tt
index e6adf62..caefd7d 100644
--- a/root/components/common-macros.tt
+++ b/root/components/common-macros.tt
@@ -705,6 +705,7 @@ END -%]
ELSIF url.url.host.search('encyclopedisque.fr'); 'encyclopedisque';
ELSIF url.url.host.search('trove.nla.gov.au'); 'trove';
ELSIF url.url.host.search('rockinchina.com'); 'ric';
+ ELSIF url.url.host.search('dhhu.dk'); 'dhhu';
ELSE; '';
END -%]
diff --git a/root/static/images/favicons/dhhu-16.png b/root/static/images/favicons/dhhu-16.png
new file mode 100644
index 0000000..016c322
Binary files /dev/null and b/root/static/images/favicons/dhhu-16.png differ
diff --git a/root/static/scripts/edit/MB/Control/URLCleanup.js b/root/static/scripts/edit/MB/Control/URLCleanup.js
index b8d7e2e..eecfa14 100644
--- a/root/static/scripts/edit/MB/Control/URLCleanup.js
+++ b/root/static/scripts/edit/MB/Control/URLCleanup.js
@@ -373,7 +373,7 @@ MB.constants.CLEANUPS = {
type: MB.constants.LINK_TYPES.vgmdb
},
otherdatabases: {
- match: new RegExp("^(https?://)?(www\\.)?(rateyourmusic\\.com/|worldcat\\.org/|musicmoz\\.org/|45cat\\.com/|musik-sammler\\.de/|discografia\\.dds\\.it/|tallinn\\.ester\\.ee/|tartu\\.ester\\.ee/|encyclopedisque\\.fr/|discosdobrasil\\.com\\.br/|isrc\\.ncl\\.edu\\.tw/|rolldabeats\\.com/|psydb\\.net/|metal-archives\\.com/|spirit-of-metal\\.com/|ibdb\\.com/|lortel.\\org/|theatricalia\\.com/|ocremix\\.org/|trove\\.nla\\.gov\\.au/|(wiki\\.)?rockinchina\\.com)", "i"),
+ match: new RegExp("^(https?://)?(www\\.)?(rateyourmusic\\.com/|worldcat\\.org/|musicmoz\\.org/|45cat\\.com/|musik-sammler\\.de/|discografia\\.dds\\.it/|tallinn\\.ester\\.ee/|tartu\\.ester\\.ee/|encyclopedisque\\.fr/|discosdobrasil\\.com\\.br/|isrc\\.ncl\\.edu\\.tw/|rolldabeats\\.com/|psydb\\.net/|metal-archives\\.com/|spirit-of-metal\\.com/|ibdb\\.com/|lortel.\\org/|theatricalia\\.com/|ocremix\\.org/|trove\\.nla\\.gov\\.au/|(wiki\\.)?rockinchina\\.com|(www\\.)?dhhu\\.dk)", "i"),
type: MB.constants.LINK_TYPES.otherdatabases,
clean: function(url) {
//Removing cruft from Worldcat URLs
@@ -386,6 +386,8 @@ MB.constants.CLEANUPS = {
url = url.replace(/^(?:https?:\/\/)?trove.nla.gov.au\/([^\/]+)\/([^\/?]+)(?:\?.*)?$/, "http://trove.nla.gov.au/$1/$2");
//Standardising RIC
url = url.replace(/^(?:https?:\/\/)?(wiki|www)\.rockinchina\.com\/w\/(.*)+$/, "http://www.rockinchina.com/w/$2");
+ //Standardising DHHU
+ url = url.replace(/^(?:https?:\/\/)?(wiki|www)\.dhhu\.dk\/w\/(.*)+$/, "http://www.dhhu.dk/w/$2");
return url;
}
}
diff --git a/root/static/scripts/tests/Control/URLCleanup.js b/root/static/scripts/tests/Control/URLCleanup.js
index 33366f2..9e92669 100644
--- a/root/static/scripts/tests/Control/URLCleanup.js
+++ b/root/static/scripts/tests/Control/URLCleanup.js
@@ -46,6 +46,15 @@ MB.tests.URLCleanup.GuessType = function() {
MB.constants.LINK_TYPES.otherdatabases.artist
],
[
+ 'artist', 'http://www.dhhu.dk/w/%C3%98stkyst_Hustlers',
+ MB.constants.LINK_TYPES.otherdatabases.artist
+ ],
+ [
+ 'release',
+ 'http://www.dhhu.dk/w/Jonny_Hefty_%26_Gratismixtape.dk_pr%C3%A6senterer_Actionspeax_-_Louder_Than_Words_Mixtape,_MP3/',
+ MB.constants.LINK_TYPES.otherdatabases.release
+ ],
+ [
'artist', 'http://www.imdb.com/name/nm1539156/',
MB.constants.LINK_TYPES.imdb.artist
],
@@ -245,6 +254,11 @@ MB.tests.URLCleanup.GuessType = function() {
'artist'
],
[
+ 'http://dhhu.dk/w/Sort_Stue',
+ 'http://www.dhhu.dk/w/Sort_Stue',
+ 'artist'
+ ],
+ [
'http://creativecommons.org/publicdomain/zero/1.0/legalcode',
'http://creativecommons.org/publicdomain/zero/1.0/',
'release'
diff --git a/root/static/styles/layout.css b/root/static/styles/layout.css
index e038716..e8c244f 100644
--- a/root/static/styles/layout.css
+++ b/root/static/styles/layout.css
@@ -559,6 +559,10 @@ div.warning img.warning {
background-image: url("../images/favicons/ric-16.png");
}
+#sidebar ul.external_links li.dhhu {
+ background-image: url("../images/favicons/dhhu-16.png");
+}
+
#sidebar .cover-art {
text-align: center;
}
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server