jquery.arrowSteps: Center arrowheads text

Code that depends on size of arrows should wait for window load.

Bug: 37109
Change-Id: Ide468a5259dd81bfbd1ca8117b091b4e9cfee7ce
mediawiki.page.gallery.resize: Remove weird mw.hook call

This mw.hook has no place here, there's various things wrong
with it:

* Naming.
  We don't prefix event names with "mediawiki" nor the module
  name. This pattern does not exist and this being here makes
  understanding mw.hook by example harder and only adds to the
  confusion.

* Synchronous behaviour.
  Aside from the naming (details..), mw.hook simply doesn't do
  what the code is asking for here and exhibits behaviour the
  gallery relies on to to happen.
  By design, mw.hook is asynchronous and memorises the last call
  for new event handlers to allow modifying the last version of a
  particular interface. It's like document-ready, if you bind
  after the document is already ready, it's just to declare it
  needs the document to be ready. It's not for exactly when that
  happened, just that it happens after.

* Plurality.
  To make matters worse, aside from naming and asynchonisity,
  the gallery is also calling it in a loop, which is another
  violation of mw.hook's design. When something emits mw.hook,
  it means any previous state is no longer active (e.g. the user
  switched modes, or navigated to another page with AJAX, or
  closed the relevant dialog, or opened another one etc.).

Also removed some mw.log calls that seems to be left from
development. If these are important during regular usage, it should
probably throw an exception or use mw.log.warn instead.

Change-Id: Iefdfab26fcd24e3f9f8f3f2fc7f1fdba9f838a25
GlobalFunctions: Deprecate swap()

This unprefixed function, added in r7198 (2b3f4c749d3d), has been
unused since r12411 (f2a59db33f33).

It is short and simple enough that on the rare occasions it is needed,
it can be inlined or copied into the calling class as a private method.

Alternatively, the idiom `list( $a, $b ) = array( $b, $a )` can be used.

Change-Id: Ieb4602597a54eb21a5de177fee6dafa7ac71ce1d
mediawiki.user: Simplify callback

Change-Id: I180e65e219b96b326ce1d33f35fd050ec1af565b
jquery.makeCollapsible: No tabindex="0" for default buttons

A button with <a href="#"> is already selectable with tabs.
The tabindex="0" generates an additional selectable element.

Change-Id: I99b51129dc7fb3b2496c393607f7d8ae7854a0b6
Remove unused message 'postcomment'

* No longer used in extensions/InputBox as of 6cfaec4f1ac8.
* No longer used in skins/Nostalgia as of 76cfc18b4e38 (actually
  earlier because LegacyTemplate::commentLink() was not called anyway).

Change-Id: I648cfc8ccb5396db2a4c836d9888f18133d432fb
jquery.textSelection: Remove references to iframe

Another attempt to solve the references to WikiEditor's 'iframe' code.
Renamed to a more suited name. The implementation still depends on
WikiEditor. Long term, we should probably move part of the WikiEditor
API into core.

Bug: 29328
Change-Id: Ibe011b2b8d045b4dace3106b8ae718a11387501e
Add link on Special:Upload to edit MediaWiki:Licenses

Add a link below the licenses selector to edit those license options (if allowed to),
similar to links on the block, delete and protect forms.

Change-Id: Iff11d114cb1bfbc2c17de44369c482cee846ed9d
Set autofocus on Special:Unblock

Replaced the tabindex=1 with autofocus to have the cursor in the target
field. This is than also the start for tabs and therefor no tabindex is
needed.
In case of a valid block the autofocus is moved to the reason field,
because the target field gets hidden.

Change-Id: I1c35f546ad22907ab824b6c51fd65655f1a91a96
Do thumb attempt-failures limitting via sha1 instead of name.

Otherwise if there is a broken file, and somebody fixes the file,
it could take an hour before thumbs are generated again. This
might confuse the user, and they may revert back to the broken
version thinking their fix didn't work.

Originally reported by Fae on wiki.

Change-Id: I024702391e5f7ccf10a406a29485601f64069405
Handle invalid language code gracefully in Language::fetchLanguageNames

Core MW doesn't have a problem, but translate extension explodes.
Seems safer to just use 'en' if passed an invalid language code.

Bug: 60629
Change-Id: I0ede3169bb49001a1515ae5b2b6d28477704f346
Don't use isset() to check for null

Those two member variables are always defined.

Change-Id: I7d1b9319bb1ce212f730a0568961eefb963fc7df
Allow HTML5 <rtc> tag (ruby support for East Asian typography).

We currently allow <ruby>, <rt>, <rb>, and <rp> but not the W3C HTML5
<rtc> element.  Fix that.

(Note that <rb> and <rtc> are new additions to HTML5 which currently
appear in the W3C but not the WHATWG version of the HTML5 spec.
Support for these has already been merged in gecko and webkit and
the editor plans to update the WHATWG spec.)

Bug: 67042
Change-Id: I8c0e65d782b6d23057a9723b87323b28e8bf8852
Do not include file redirects in Special:Wantedfiles

If you look at [[Special:WantedFiles]] on commons, its full
of file redirects, making the page kind of useless. This makes
the query much more complex, but at least the page will be useful.

The page will still be useless on non-commons projects due to
foreign files being listed as missing.

Change-Id: I115fdaa3b67bee81ba0a715ebb427bb35cf0f67e
Fix RepoGroup::hasForeignRepos() and RepoGroup::forEachForeignRepo()

Also add unit tests for those methods.

Change-Id: Ic72be60d13820492efc90b5925bb5cfc1813d28a
Change message on Special:Wantedfiles based on if foreign repo on.

If foreign repos are off, no need to warn about false positives.

I mostly want this change for an upcoming change I'm making in
GlobalUsage - I660a61327cdb528

Change-Id: Ibcf63d48c50523722ce8384fa6b4b1f68524482c
Don't use isset() to check for null

- Remove isset for defined member variables
- Add a missing definition of member variable $mTextId
- Fix documentation of $mTextRow
- Standardize checks for null to use "=== null" or "!== null"
  instead of is_null()

Change-Id: I56e364bc14b5a3961a2538371ae4b0088babc5c7
Force array parameters in SiteConfiguration

Now that we require PHP 5.1 (for quite some time actually)
we can force method parameters to be array.

Change-Id: Ia4a262320344e05cc1625c041a3aa4ec41034ad7
Don't try to render indexed xcf images with image magick.

Image magick doesn't support them.

See some discussion at bug 35622 comment 9

Change-Id: I127bcb5458a4c06f043a4f5d0ae6d70bd7809e64
Fix alpha transparency in XCF images

The -layers merge option flattens all layers on to a canvas
of whatever color -background is set to. However -background
was white for the PNG bKGD chunk. Set it to transparent just
for the -layers merge operation.

This works well on most recent image magick. Older image magick
explodes on my test image (I tested 6.6.0-4), so unclear if it
works there, but it certainly didn't make anything worse.
Wikimedia uses a version between the two that I tested so hopefully
this will make things better, and if it doesn't, it eventually will
when we update image magick.

Bug: 35622
Change-Id: I77601cdf005a64ae8ea7516cc846620431917863