Last modified: 2014-09-10 16:46: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 T33946, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31946 - mediawiki.legacy.upload should be migrated to a modern module
mediawiki.legacy.upload should be migrated to a modern module
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: 1.24.0 release
Assigned To: Alex Monk
: javascript
Depends on:
Blocks: 31926
  Show dependency treegraph
 
Reported: 2011-10-25 20:45 UTC by Helder
Modified: 2014-09-10 16:46 UTC (History)
6 users (show)

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


Attachments

Description Helder 2011-10-25 20:45:42 UTC
Per bug 31926 comment 5, please update this script to use ResourceLoader.
Comment 1 Kevin Israel (PleaseStand) 2012-12-16 04:38:50 UTC
Just a question: do we still need the AJAX destination filename check now that we have the upload stash?

Converting the check to use the API in a sensible manner has proven to be quite a challenge, and I suppose that's why it hasn't been done yet. Unlike SpecialUpload::ajaxGetExistsWarning(), API modules return error codes and not messages in the user's language. 

I suppose I could add a "warnings only" mode to the upload API, which would not require uploading an actual file. Then, if it returns an error or warning code, the script could make a second API request for the actual message text. There ought to be a better way to load fully parsed messages such as https://commons.wikimedia.org/wiki/MediaWiki:Fileexists though.
Comment 2 Helder 2012-12-16 21:35:41 UTC
(In reply to comment #1)
> ... API modules return error codes and not
> messages in the user's language.

Bug 35074?
Comment 3 Kevin Israel (PleaseStand) 2013-05-28 12:33:53 UTC
Unassigning from myself. I am not currently working on this because of the aforementioned limitation of the MW API.
Comment 4 Alex Monk 2014-08-24 15:53:36 UTC
(In reply to Kevin Israel (PleaseStand) from comment #1)
> Just a question: do we still need the AJAX destination filename check now
> that we have the upload stash?
> 
> Converting the check to use the API in a sensible manner has proven to be
> quite a challenge, and I suppose that's why it hasn't been done yet. Unlike
> SpecialUpload::ajaxGetExistsWarning(), API modules return error codes and
> not messages in the user's language. 
> 
> I suppose I could add a "warnings only" mode to the upload API, which would
> not require uploading an actual file. Then, if it returns an error or
> warning code, the script could make a second API request for the actual
> message text. There ought to be a better way to load fully parsed messages
> such as https://commons.wikimedia.org/wiki/MediaWiki:Fileexists though.

I moved that stuff to the API in Gerrit change #65641
Comment 5 Gerrit Notification Bot 2014-08-27 15:09:20 UTC
Change 156552 had a related patch set uploaded by Alex Monk:
Clean up mediawiki.legacy.upload a bit more

https://gerrit.wikimedia.org/r/156552
Comment 6 Gerrit Notification Bot 2014-08-30 20:17:56 UTC
Change 156552 merged by jenkins-bot:
Clean up mediawiki.legacy.upload a bit more

https://gerrit.wikimedia.org/r/156552
Comment 7 Alex Monk 2014-08-30 20:55:09 UTC
I think the next steps for this bug are:
* Merging the code into mediawiki.special.upload
* Considering what variables we expose globally (maybe moving some stuff under mw.)
Comment 8 Gerrit Notification Bot 2014-09-05 20:37:15 UTC
Change 158677 had a related patch set uploaded by Alex Monk:
Merge mediawiki.legacy.upload into mediawiki.special.upload

https://gerrit.wikimedia.org/r/158677
Comment 9 Alex Monk 2014-09-10 16:40:32 UTC
(In reply to Alex Monk from comment #7)
> * Merging the code into mediawiki.special.upload

This is done.

(In reply to Alex Monk from comment #7)
> * Considering what variables we expose globally (maybe moving some stuff
> under mw.)

Actually I think that is kind of out of the scope of this bug. Closing as fixed.
Comment 10 Gerrit Notification Bot 2014-09-10 16:46:12 UTC
Change 158677 merged by jenkins-bot:
Merge mediawiki.legacy.upload into mediawiki.special.upload

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

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


Navigation
Links