[mb-commits] branch, beta, updated. Merge remote-tracking branch 'reosarevok/mbs-5798' into beta Normalise wikiso...

MusicBrainz Git Server <[email protected]> Tue, 29 Jan 2013 18:37:36 +0000
Newsgroups gmane.comp.audio.musicbrainz.cvs
Message-ID <E1U0G3s-0007KE-9e@wiley>
The branch, beta has been updated
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=c1ee09283d8e7d4d0a46fcf7c7819f53bae33a8e (commit)
       via  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=49eaebe7a8b7689f5d2e3616647ea4217fe1cfe5 (commit)
      from  http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=21a00690f2373171070d5e5ff189f7f1e97adca2 (commit)

Summary of changes:
 root/static/scripts/edit/MB/Control/URLCleanup.js |    5 ++++-
 root/static/scripts/tests/Control/URLCleanup.js   |    5 +++++
 2 files changed, 9 insertions(+), 1 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 c1ee09283d8e7d4d0a46fcf7c7819f53bae33a8e
Merge: 21a0069 49eaebe
Author: Ian McEwen <[email protected]>
Date:   Tue Jan 29 11:47:22 2013 -0700

    Merge remote-tracking branch 'reosarevok/mbs-5798' into beta
    
    * reosarevok/mbs-5798:
      Normalise wikisource URLs to http
    
    Conflicts:
    	root/static/scripts/edit/MB/Control/URLCleanup.js

diff --cc root/static/scripts/edit/MB/Control/URLCleanup.js
index 5bc9c27,fe5bb59..3cd8cbc
--- a/root/static/scripts/edit/MB/Control/URLCleanup.js
+++ b/root/static/scripts/edit/MB/Control/URLCleanup.js
@@@ -271,8 -271,11 +271,11 @@@ MB.constants.CLEANUPS = 
          }
      },
      lyrics: {
 -        match: new RegExp("^(https?://)?([^/]+\\.)?(lyrics\\.wikia\\.com|directlyrics\\.com|lyricstatus\\.com|kasi-time\\.com|wikisource\\.org|recmusic\\.org)", "i"),
 +        match: new RegExp("^(https?://)?([^/]+\\.)?(lyrics\\.wikia\\.com|directlyrics\\.com|lyricstatus\\.com|kasi-time\\.com|wikisource\\.org|recmusic\\.org|j-lyric\\.net)", "i"),
-         type: MB.constants.LINK_TYPES.lyrics
+         type: MB.constants.LINK_TYPES.lyrics,
+         clean: function(url) {
+             return url.replace(/^https:\/\/([a-z-]+\.)?wikisource\.org/, "http://$1wikisource.org");
+         }
      },
      bbcmusic: {
          match: new RegExp("^(https?://)?(www\\.)?bbc\\.co\\.uk/music/artists/", "i"),

commit 49eaebe7a8b7689f5d2e3616647ea4217fe1cfe5
Author: reosarevok <[email protected]>
Date:   Tue Jan 29 13:47:11 2013 +0000

    Normalise wikisource URLs to http

diff --git a/root/static/scripts/edit/MB/Control/URLCleanup.js b/root/static/scripts/edit/MB/Control/URLCleanup.js
index 74966f8..fe5bb59 100644
--- a/root/static/scripts/edit/MB/Control/URLCleanup.js
+++ b/root/static/scripts/edit/MB/Control/URLCleanup.js
@@ -272,7 +272,10 @@ MB.constants.CLEANUPS = {
     },
     lyrics: {
         match: new RegExp("^(https?://)?([^/]+\\.)?(lyrics\\.wikia\\.com|directlyrics\\.com|lyricstatus\\.com|kasi-time\\.com|wikisource\\.org|recmusic\\.org)", "i"),
-        type: MB.constants.LINK_TYPES.lyrics
+        type: MB.constants.LINK_TYPES.lyrics,
+        clean: function(url) {
+            return url.replace(/^https:\/\/([a-z-]+\.)?wikisource\.org/, "http://$1wikisource.org");
+        }
     },
     bbcmusic: {
         match: new RegExp("^(https?://)?(www\\.)?bbc\\.co\\.uk/music/artists/", "i"),
diff --git a/root/static/scripts/tests/Control/URLCleanup.js b/root/static/scripts/tests/Control/URLCleanup.js
index 3a81b83..9310426 100644
--- a/root/static/scripts/tests/Control/URLCleanup.js
+++ b/root/static/scripts/tests/Control/URLCleanup.js
@@ -363,6 +363,11 @@ MB.tests.URLCleanup.GuessType = function() {
                     'https://itunes.apple.com/us/album/id566322358',
                     'release'
                 ],
+                [
+                    'https://pt.wikisource.org/wiki/A_Portuguesa',
+                    'http://pt.wikisource.org/wiki/A_Portuguesa',
+                    'work'
+                ],
 
                 // MBS-4810: exactly one terminating slash at the end
                 [

-----------------------------------------------------------------------


hooks/post-receive
-- 
mb_server