Removed user-agent string from mw.feedback posts
authorTrevor Parscal <tparscal@wikimedia.org>
Tue, 2 Oct 2012 23:23:10 +0000 (16:23 -0700)
committerTimo Tijhof <ttijhof@wikimedia.org>
Wed, 3 Oct 2012 01:42:05 +0000 (03:42 +0200)
Legal found this to be unacceptable

Change-Id: Ib8746ece3a34b5e577dc08596b0ff7b1b96b5d73

languages/messages/MessagesEn.php
resources/mediawiki/mediawiki.feedback.js

index 42e7616..742bfb1 100644 (file)
@@ -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',
index f0f78c2..634d02b 100644 (file)
                },
 
                submit: function () {
-                       var fb = this;
-
-                       // get the values to submit
-                       var subject = this.subjectInput.value;
-
-                       var message = '<small>User agent: ' + mw.html.escape( navigator.userAgent ) + '</small>\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();
                                        // 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.