Page MenuHomePhabricator

resources/mw.FormDataTransport.js makes use of deprecated jQuery.browser and uses string comparison
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/UploadWizard.git;a=blob;f=resources/mw.FormDataTransport.js;h=25deb49e3a5aa66ed27d38e097410eef260cbb3a;hb=master#l26

l.26 of UpWiz/resources/mw.FormDataTransport.js compares two strings. This makes the condition true for my current Firefox version ("17.0" < "7.0" === true) so, a more resource insensitive method is used instead of the native FormData()
This is not the intended behaviour; "this.gecko" should be only true for Firefox versions lower than 7.0 (https://bugzilla.mozilla.org/show_bug.cgi?id=649150).

To fix the issues, it needs to

  1. eliminate the use of deprecated $.browser
  2. when comparing versions, compare them as numbers

Version: unspecified
Severity: minor

Details

Reference
bz43821

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:33 AM
bzimport set Reference to bz43821.
Rillke created this task.Jan 10 2013, 12:38 PM

Note to myself:
Formdata won't work before FF 22 [ https://bugzilla.mozilla.org/show_bug.cgi?id=649150 ] because it will use "blob" as file name (ignoring the specified file name) and MediaWiki will complain about a missing file extension.

Change 74425 had a related patch set uploaded by Rillke:
Replacing deprecated $j.browser with $.client

https://gerrit.wikimedia.org/r/74425

Change 74425 merged by jenkins-bot:
Replacing deprecated $j.browser with $.client

https://gerrit.wikimedia.org/r/74425

Change 141140 had a related patch set uploaded by Inchikutty:
Replacing deprecated $j.browser with $.client

https://gerrit.wikimedia.org/r/141140

Change 141140 abandoned by Alex Monk:
Replacing deprecated $j.browser with $.client

https://gerrit.wikimedia.org/r/141140

[Restoring previous FIXED status]

Gilles moved this task from Untriaged to Done on the Multimedia board.Dec 4 2014, 10:54 AM