Index: trunk/extensions/UploadWizard/resources/mw.FlickrChecker.js |
— | — | @@ -16,7 +16,7 @@ |
17 | 17 | 'Attribution License': '{{flickrreview}}{{cc-by-2.0}}', |
18 | 18 | 'Attribution-ShareAlike License': '{{flickrreview}}{{cc-by-sa-2.0}}', |
19 | 19 | 'Attribution-NoDerivs License': 'invalid', |
20 | | - 'No known copyright restrictions': '{{flickrreview}}{{PD-Old}}', |
| 20 | + 'No known copyright restrictions': '{{flickrreview}}{{Flickr-no known copyright restrictions}}', |
21 | 21 | 'United States Government Work': '{{flickrreview}}{{PD-USGov}}' |
22 | 22 | }, |
23 | 23 | |
— | — | @@ -30,8 +30,8 @@ |
31 | 31 | * @param upload - the upload object to set the deed for |
32 | 32 | */ |
33 | 33 | checkFlickr: function( url, $selector, upload ) { |
34 | | - if ( url.search(/http:\/\/(www.)?flickr.com\/photos\//) !== -1 ) { |
35 | | - photoIdMatches = url.match(/photos\/[^\/]+\/([0-9]+)/); |
| 34 | + photoIdMatches = url.match(/flickr.com\/photos\/[^\/]+\/([0-9]+)/); |
| 35 | + if ( photoIdMatches && photoIdMatches[1] > 0 ) { |
36 | 36 | photoId = photoIdMatches[1]; |
37 | 37 | $.getJSON(this.apiUrl+'&method=flickr.photos.getInfo&api_key='+this.apiKey+'&photo_id='+photoId+'&format=json&jsoncallback=?', |
38 | 38 | function( data ) { |
— | — | @@ -55,8 +55,6 @@ |
56 | 56 | $.each( data.licenses.license, function(index, value) { |
57 | 57 | mw.FlickrChecker.licenseList[value.id] = value.name; |
58 | 58 | } ); |
59 | | - console.debug(mw.FlickrChecker.licenseList); |
60 | | - console.debug(mw.FlickrChecker.licenseMaps); |
61 | 59 | } |
62 | 60 | } |
63 | 61 | ); |