Fix string callbacks for special page registration

Currently registering a special page with a factory by passing the
callback string does not work because the is_string check comes
before the is_callback check. If we change the order of this if-
clauses we can also support callbacks like 'Factory::createPage'.

Change-Id: I751f97026ed8c580732c74d66b2804dd180ed16f
More sensible behavior when special page aliases conflict

Right now, SpecialPageFactory::getAliasListObject() just chooses the
last-seen alias and allows any alias to completely override the page's
"canonical" name (from SpecialPageFactory::$list or $wgSpecialPages).
Although the latter doesn't come up often since (almost?) all special pages
have their canonical name as one of their English-language aliases.

More sensible behavior is to always prefer the "canonical" name over any
conflicting aliases, and to prefer an alias that's the first alias for a
special page over one that is a fallback.

Also, when a special page's first alias winds up not actually referring
to that special page, we MUST NOT go redirecting other names for that
special page to that wrong alias.

Bug: 70686
Change-Id: I4b17ec0fdc87b4b0d7ae9d9eea7ffacb54dd6891
(cherry picked from commit ad522beeea5037ced24781df515b880cf75733ca)
Article: Handle double redirects in data for mediawiki.action.view.redirect

Bug: 71002
Change-Id: Id7dd37a4865635d3b68aac70179890be6ab89210
(cherry picked from commit 39292da1a67e63797f09973af26e0af246089d0c)
Remove $wgGoToEdit functionality

SpecialSearchNogomatch can be used with a 1 liner to accomplish the
same thing. In fact, there's an extension (BypassSearch) that already
does this.

Change-Id: I5d7e56ec6fe1110e29ac5c8ba5482b8fc2bf1956
(cherry picked from commit 43df36eceb6b1200b6d1eb6b42e8ef21c65a8832)
Extensions may add tests by directory

The UnitTestsList hook can now be used to add entire directories of
tests, à la phpunit.xml's <directory> tag.  The test suite is built by
recursively scanning the directory for any files ending in "Test.php".

TODO:
* Update online hook documentation.
* Generate and autoload a classmap for scanned directories.

Bug: 70630
Change-Id: I3089372f9d7c645e16ff0984a959f982a3bc639f
Restore next link to Special:AllPages

This commit is a follow-up to 9ffa5fc.

Bug: 69951
Change-Id: If244ebd656bf1537e671fd986edc39bcc01bb9b5
Merge "Extensions may add tests by directory" into REL1_24
Merge "Fix string callbacks for special page registration" into REL1_24
hash_equals(): Avoid division by zero when $known_string is empty

Per Tim Starling's review of Icb239471, reverted back to the version of
the function from Patch Set 1 of Iece006ec, which did not have the bug.
This version does not attempt to minimize the inevitable leakage of the
string's length.

Also revised the doc comment to explain more effectively what the problem
with a normal (===) string comparison is for the use cases of this function.

Follows-up b9e1d5f5c066.

Change-Id: I1b347e69b39af3d7d8ba6673af63f1a616befbdf
(cherry picked from commit 4620e3b862568d76661e86857779795f4f974e13)
Fix creating non-parameterized hashes in ParameterizedPassword

I noticed MWOldPassword is broken while working on
I7024b287a7. When generating new passwords for it,
a superfluous : is being added to the serialized hash
within the database (and that breaks parsing so that
people can't ever log in).

As this is not really relevant in the real world (as
nobody is hopefully using plain MD5 passwords anymore),
this doesn't need any backward compatibility handling
for the broken hashes.

Change-Id: I753c135a6de39008488bd7462c2bfcda2cbac116
1.24.0-rc.0

Update RELEASE-NOTES and DefaultSettings.php with pertinent info.

Change-Id: Icebbb3a5b96ca05ad05c2abedbb791cc9935bf6a
Revert "1.24.0-rc.0"

The original commit fails test

This reverts commit 08139779e0129aba9a1d15ca073a895f6df0d63b.

Change-Id: Ia2ae8d8bf0de7513258f2338eb1793471f38a240
Add Content-Length header for job queue requests

Include the Content-Length header in job queue POST requests to meet the
requirement by certain servers, avoiding HTTP 411 responses.

Bug: 72274
Change-Id: Icf34bca58c792225d735d576213d6887015459ca
(cherry picked from commit 224fa32920b23e9ff2d32a98bcd3c8ab414847fd)
Update version to 1.24.0-rc.0

Updates RELEASE-NOTES and DefaultSettings.php with pertinent info.

Alters MediaWikiVersionFetcher::fetchVersion() so that tests allow
versions to use Semantic Versioning (http://semver.org/)

Change-Id: I2255ac2999ad207203fa6514f2e1b23f5d7965d7
Merge "hash_equals(): Avoid division by zero when $known_string is empty" into REL1_24
mw.Title: Add new static methods `newFromFileName`, `newFromUserInput`

This is the replacement for Ia57e4b0e804.

Use cases:

- UploadWizard: Suggesting valid tiles for files supplied by user
  whose names are invalid MediaWiki titles.
- Upload Form: The same.
- Community scripts, VisualEditor upload gadget, [...]: The same.

Bug: 64912
Bug: 64922
Change-Id: I260ba883548975263bba03d25f6d11d3d9bbfbd9
(cherry picked from commit cc8b00ed5bf69dafac2413d9c4387523a14bc62a)
Add Oracle version of update-keys.sql

Oracle appears not to like the mysql version.

Note: update-keys.sql is only inserted on install,
never on update, so the fact that it's not INSERT IGNOREing
should not matter.

Bug: 71040
Change-Id: Iaf4a284d24cefb16f0e7583c7b84ae3f38437f2f
(cherry picked from commit 6253cc6b2fbb0f9b1b21e52f71d63acca9cef13b)
Schema is not PostgreSQL connection parameter

Temporary fix for bug 70030.

openConnectionWithParams() got a new schema
parameter in 30a82aae9cf and therefore must
not be used to probe some available databases
when checking username/password, because
schema is not at all a PostgreSQL connection
parameter - it something similar to
"current directory" in the database. PostgreSQL
can additionally search additional schemas
for objects in necessary.

This whole openPgConnection logic needs some
deeper repair; for now however, let's quickly
fix bug 70030 which is caused by that fact
that openConnectionWithParams returns magic
"Status" object and no longer a DatabasePostgres
instance we can directly talk to.

As a result, openPgConnection( "create-db" )
was returning a Status object that had
another Status object embedded in the value
field.

This reverts partially commit 30a82aae9cf7e5536eef761637a1277b7c18017e.

Conflicts:
	includes/installer/Installer.php
	includes/installer/PostgresInstaller.php
	maintenance/install.php

Bug: 70030
Change-Id: I61d5f262e60722bc08201b40b61a298d8af42223
Merge "More sensible behavior when special page aliases conflict" into REL1_24
Bump version for RC.1 and update release notes

Change-Id: I47f1a68bda9dd14da9c0a4a563b20ed3a692ba47