feedback: Fix misplaced mw.Title.getNameText() call
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 13 May 2019 08:21:10 +0000 (10:21 +0200)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Mon, 13 May 2019 08:21:10 +0000 (10:21 +0200)
What is called "name" here is a file name without the extension. But
the feedback code is not about files. It's a regular page that might
contain a dot. If it does, the link will be broken, because everything
after the last dot will be stripped.

Change-Id: I9a7c7b73f5d899400ffdc4f4a92cb8b42e644b1c

resources/src/mediawiki.feedback/feedback.js

index 3ffc496..306d93a 100644 (file)
                                this.messagePosterPromise = settings.messagePosterPromise;
                                this.setBugReportLink( settings.bugsTaskSubmissionLink );
                                this.feedbackPageTitle = settings.title;
-                               this.feedbackPageName = settings.title.getNameText();
+                               this.feedbackPageName = settings.title.getMainText();
 
                                // Useragent checkbox
                                if ( settings.useragentCheckbox.show ) {