Skip to content

Commit 19634e3

Browse files
authored
Merge pull request #280 from wmde/no-pd-on-edited
Dont show public domain snippet when image was edited
2 parents e7bce6c + 4568c75 commit 19634e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/app/DialogueEvaluation.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ $.extend( DialogueEvaluation.prototype, {
136136
var url = this.getAttributionLicence().getUrl();
137137
if( url ) {
138138
attribution += ', ';
139-
if( licence.isPublicDomain() ) {
139+
if( !editingAttribution && licence.isPublicDomain() ) {
140140
attribution += Messages.t( 'dialogue.pd-attribution-hint' )
141141
+ ', ' + Messages.t( 'dialogue.check-details' )
142142
+ ' Wikimedia Commons: ';
@@ -150,18 +150,18 @@ $.extend( DialogueEvaluation.prototype, {
150150
_getHtmlAttribution: function() {
151151
var attributionLink;
152152
var licence = this.getAttributionLicence();
153-
if( licence.isPublicDomain() ) {
153+
var editingAttribution = this._getEditingAttribution();
154+
155+
if( !editingAttribution && licence.isPublicDomain() ) {
154156
attributionLink = ', ' + Messages.t( 'dialogue.pd-attribution-hint' );
155157
if( licence.getUrl() ) {
156158
attributionLink += ', ' + Messages.t( 'dialogue.check-details' ) + ' '
157159
+ this._makeLink( licence.getUrl(), 'Wikimedia Commons' );
158160
}
159161
} else {
160162
attributionLink = ', ' + this._getHtmlLicence();
161-
// attributionLink = this._getHtmlLicence();
162163
}
163164

164-
var editingAttribution = this._getEditingAttribution();
165165
if( editingAttribution ) {
166166
editingAttribution = ', ' + editingAttribution;
167167
}

0 commit comments

Comments
 (0)