User "Raindrift" posted a comment on MediaWiki.r93137. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93137#c20222 Commit summary:
Added a workaround for the lack of RequestContext in 1.17, so this code can be rolled into production. This code can be removed in 1.18+, but it'll work either way. Comment: I'm not quite sure I understand, but let me see if this clears it up: This version of UploadStash is needed to make the current version of UploadWizard work, and also to fix a bug that prevented simultaneous file uploads from working. Neilk and I were working on merging it into the current release branch so it could be deployed before 1.18 is released. This code is present because the RequestContext dependency is the only thing that prevented this code from working in 1.17, but we're actively developing it in trunk. I can't commit changes against anything but trunk or my own branch, and branching for this seemed wrong. Making a change for production in a working copy and wrapping it up in a patch (but not checking it in) also seemed wrong. It's necessary to grab the User object in the constructor because new uses of $wgUser are apparently frowned upon in 1.18+, so I'm not accessing the global each place it's used. The UploadStash from 1.17 isn't aware of the current user at all, since it stores its state in the session. I'm sure there's a correct way to introduce code that's only needed when back-porting a feature to production. If someone feels like explaining that part of the process to me, that'd be the best. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
