From: Trevor Parscal Date: Tue, 2 Oct 2012 23:23:10 +0000 (-0700) Subject: Removed user-agent string from mw.feedback posts X-Git-Tag: 1.31.0-rc.0~22195^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=4db808ac5097b73f11a00381bb0010b20dcf07a8;p=lhc%2Fweb%2Fwiklou.git Removed user-agent string from mw.feedback posts Legal found this to be unacceptable Change-Id: Ib8746ece3a34b5e577dc08596b0ff7b1b96b5d73 --- diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 42e76162a0..742bfb1d75 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4872,7 +4872,7 @@ This site is experiencing technical difficulties.', # Feedback 'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug]. -Otherwise, you can use the easy form below. Your comment will be added to the page "[$3 $2]", along with your username and what browser you are using.', +Otherwise, you can use the easy form below. Your comment will be added to the page "[$3 $2]", along with your username.', 'feedback-subject' => 'Subject:', 'feedback-message' => 'Message:', 'feedback-cancel' => 'Cancel', diff --git a/resources/mediawiki/mediawiki.feedback.js b/resources/mediawiki/mediawiki.feedback.js index f0f78c2e04..634d02b14f 100644 --- a/resources/mediawiki/mediawiki.feedback.js +++ b/resources/mediawiki/mediawiki.feedback.js @@ -214,20 +214,10 @@ }, submit: function () { - var fb = this; - - // get the values to submit - var subject = this.subjectInput.value; - - var message = 'User agent: ' + mw.html.escape( navigator.userAgent ) + '\n\n' - + this.messageInput.value; - if ( message.indexOf( '~~~' ) === -1 ) { - message += ' ~~~~'; - } - - this.displaySubmitting(); + var subject, message, + fb = this; - var ok = function ( result ) { + function ok( result ) { if ( result.edit !== undefined ) { if ( result.edit.result === 'Success' ) { fb.displayThanks(); @@ -239,15 +229,27 @@ // edit failed fb.displayError( 'feedback-error2' ); } - }; + } - var err = function ( code, info ) { + function err( code, info ) { // ajax request failed fb.displayError( 'feedback-error3' ); - }; + } + + // Get the values to submit. + subject = this.subjectInput.value; + + // We used to include "mw.html.escape( navigator.userAgent )" but there are legal issues + // with posting this without their explicit consent + message = this.messageInput.value; + if ( message.indexOf( '~~~' ) === -1 ) { + message += ' ~~~~'; + } + + this.displaySubmitting(); this.api.newSection( this.title, subject, message, ok, err ); - }, // close submit button function + }, /** * Modify the display form, and then open it, focusing interface on the subject.