mw.ForeignStructuredUpload: Use '{{own}}' template for 'source' field
authorBartosz Dziewoński <matma.rex@gmail.com>
Tue, 13 Oct 2015 15:17:46 +0000 (17:17 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Tue, 13 Oct 2015 15:17:46 +0000 (17:17 +0200)
Change-Id: Ib939b6c8b0ae3afdb93465721de8de995687b81a

resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js

index d270916..4ec92e7 100644 (file)
@@ -77,7 +77,7 @@
                        '\n|date=' +
                        this.getDate() +
                        '\n|source=' +
-                       this.getUser() +
+                       this.getSource() +
                        '\n|author=' +
                        this.getUser() +
                        '\n}}\n\n' +
                return '';
        };
 
+       /**
+        * Get the source. This should be some sort of localised text for "Own work".
+        *
+        * @private
+        * @return {string}
+        */
+       ForeignStructuredUpload.prototype.getSource = function () {
+               return '{{own}}';
+       };
+
        /**
         * Get the username.
         *