Page MenuHomePhabricator

New extension: "Upload To Wikimedia Commons Tab"
Closed, ResolvedPublic


Author: ermwiki

The patch's code

I have a patch's code for new extension: "Upload To Wikimedia Commons Tab".
I'll be happy if you will check the code, fix its and upload its.
Please say me when the extension will upload to MediaWiki, for I'll make the page "".

Version: unspecified
Severity: enhancement




Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:10 PM
bzimport set Reference to bz14957.
bzimport added a subscriber: Unknown Object (MLST).

ermwiki wrote:

The new patch, without the hebrew translating

I uploaded the new patch without the hebrew translating, without problems in that translating.


A few comments:

  1. That long condition "if ( $interface != 'ar' && $interface != 'en'..." is unmaintainable. It should be replaced with an array and in_array() call or something like that.
  2. It doesn't support the Wikimedia secure server
  3. English in i18n is a bit broken.
  4. From CommonsHelper's main page: "ATTENTION: For technical reasons, most non-ASCII characters in filenames will be "ASCIIfied". Some asian characters will break altogether. Fix is on the to-do list."

A few more notes:

  1. Typos in defined(), $wgAvailableRights[] and wfLoadExtensionMessages()
  2. Putting $wgExtensionCredits[] in your hook function will cause it to not be loaded on Special:Version. Code within showTabUploadtocommons() is only executed when the SkinTemplateContentActions hook is called.
  3. Your logic with descriptionmsg won't work if you move it outside the function, so I suggest dropping the "No work" version.

It looks like what this does is add a tab to pass off a file to the 'Move to commons' toolserver utility.

I'd much rather see a "native" tool here which does the same job, but inside MediaWiki, making use of global accounts for seamless session transfer, and avoiding the hardcoded checks for the source project's site.

Removed keyword 'patch', as the solution was rejected. Please provide a patch taking comment 4 into account.

Looks like there is no actual proposed extension; the larger issue (easily moving files to Commons) already has a dedicated feature request.

Closing accordingly as duplicate of bug 5283

  • This bug has been marked as a duplicate of bug 5283 ***