Last modified: 2010-07-21 21:54:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18125, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16125 - Create is_ff3 in wikibits.js
Create is_ff3 in wikibits.js
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.14.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks: javascript
  Show dependency treegraph
 
Reported: 2008-10-26 11:57 UTC by Dan Barrett
Modified: 2010-07-21 21:54 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dan Barrett 2008-10-26 11:57:04 UTC
Please create an "is_ff3" variable in wikibits.js that detects FireFox 3 and up, just like "is_ff2" detects versions 2 and up.  This version of FireFox contains a significant change in its "file upload" feature that breaks several of our homegrown extensions, so it would be very helpful to detect the browser version.

We could do this ourselves but I believe it would be helpful to others to have it in core code, since it's so simple. Thank you.

I imagine it would be simply:

var is_ff3 = /firefox\/[3-9]|minefield\/3/.test( clientPC );
Comment 1 Dan Barrett 2008-10-26 12:00:25 UTC
The file upload feature change:

http://ubuntuforums.org/archive/index.php/t-929711.html

The file path is no longer transmitted to the browser, only the base filename.
Comment 2 Splarka 2008-10-26 12:12:13 UTC
You might wanna read bug 12766 ... especially https://bugzilla.wikimedia.org/show_bug.cgi?id=12766#c4
Comment 3 Dan Barrett 2008-10-26 12:39:53 UTC
The choice of implementation doesn't matter (to me), whether the functionality is in a variable, function, etc.  As long as MediaWiki provides some way to detect the browser and version in use.  This "file upload" change is pretty significant.
Comment 4 Niklas Laxström 2008-10-27 06:48:04 UTC
You should test the bug/change, not browser version. Is that possible here?
Comment 5 Dan Barrett 2008-10-27 11:37:37 UTC
Interesting idea, but in this case, I don't think it can be done in a friendly manner.  The feature (<input type="file">) is available in all browsers; only FF3 considers it a security risk to return the full file path (which we need). You could  check the results AFTER the user has spent the time navigating to a file and selecting it, and then say, "Sorry, that file you just spent time selecting, you can't use it."  But that's nasty to the user.
Comment 6 Chad H. 2009-01-09 02:59:54 UTC
Fwiw: an is_ff3 is adding more hacky variables that shouldn't be :)

I'd suggest a nice framework that allows us to detect browser versions more easily. Then things like isBrowser( 'ie6' ) or 'ff3' could be tested and accounted for. I know these things are always less-than-ideal. Just wanted to throw the idea out.
Comment 7 Platonides 2010-07-21 21:45:08 UTC
I don't see the need of a is_ff3 to check if you will get a full path or not. You should look if it has a folder name or not.
Other browsers also do the same, even IE, which uses a fake path, which will be the reaction from every browser in the future (html5)...
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2010-07-21 21:54:12 UTC
The current array of variables is obnoxious and should die, fully agree with not adding more.  I think jQuery will do this for you anyway, once that's always available by default (is it yet?).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links