Add tests for API's assert={user|bot}

Change-Id: I5bff0adf11bccef137d59c05edae45d774596994
shell script fix using shellcheck lint

* shellcheck script used: https://github.com/koalaman/shellcheck
* includes/php.sh: Use $(..) instead of deprecated `..`.

Change-Id: Ie1dfff97b548aca75d76c762b74f8fcab84d46fb
editintro given a css class of its own

The template added using the editintro url parameter is
contained within a div tag with a unique class 'mw-editintro'

Bug: 30959
Change-Id: I9afa41a01a2318fba27df04054871cd593be7e92
(bug 56849) Deprecate dangerous edittime-based content update functions

Existing edit conflict logic relies on second-resolution timestamps,
which can fail in many exciting ways.  This patch provides new support
functions which take an explicit revision ID instead of a timestamp.

No functionality is changed.  Hopefully.

TODO:
* Make use of this code by replacing all edittime and starttime logic
with an explicit baseRevId.

Change-Id: I83cdd4adaaa67f81e933654228eccdc9fcdf9009
Add jMY to Arab date formats ($datePreferences)

Example: ١٧:٥١، ٢٧ رجب ١٤٣٥

Bug: 65245
Change-Id: I5d4a799b0d6c17646678b39820599bf5cda82177
Made TransactionProfiler handle interlaced transactions better

* Previously the list of involved DBs might be incomplete

Change-Id: I75b91d3b9a951169038b40b9cf2f59707ba0c11d
Transaction coverage fix for doDeleteArticleReal

* Do the FOR UPDATE select to get the ID *after* BEGIN, otherwise the
  locks will disappear right afterwards with the implicit commit.

Change-Id: Ia531126cb4a86ec7789ceb7327d1c235c7aa979c
Final page of search results sometimes having erroneous "next" link

Pre-patch: In the showResults method of the SpecialSearch class, a request is made
through the appropriate SearchEngine object for a single page (according to the
specified page size) of search results. With this approach, it's impossible for the
page formatter to determine whether an additional page is useful when a result set no
smaller than the requested size is returned.

Post-patch: The solution is to request an extra result, which we do not display, but we
do include in our result count. Display of the extra result is avoided by modifying
SpecialSearch->showMatches() to explicitly honor the limit property of its calling
instance. The criterion for not linking to a next page is then updated from
 results < limit.
which enables the next link whenever the current results page is full, to
 results <= limit
which enables the next link only when there will be results displayed on the next page.

Bug: 19938
Change-Id: Ic30586e217fbde4b9d0aeda277a77030c4dce216
Return a TTL when formatting times

Add an out parameter to Language::sprintfDate that returns the amount of
time that its output is valid for (e.g., an output format of 'Y-m-d' at
11:50 PM would be valid for 600 seconds).

Change-Id: I3f5a80aa4d303f92c97d24ab780af920894d24ef
Remove use of strencode() outside Database classes

Change-Id: Idbc38d8089541e5154b2601297b429f7433fd59e
Add some SVG element namespaces

Noticed that we have several old images on commons that use these
namespaces. They seem harmless, so I think we should add them.

Change-Id: Ib80298256c5d4717867eb857d5404a9487fed784
Make "mini" the default alias for "thumb" in German

It's already "mini" in other languages.

The German Wikipedia community (which is obviously not the only German
one but the biggest) always complained a bit about the previously
used "miniatur". It's German, yes, but error-prone. The solution
was to add "mini". Which made most users happy as far as I can
tell after all these years.

My patch doesn't change anything except for one little detail:
The JavaScript call
mw.config.get( 'wgWikiEditorMagicWords' ).img_thumbnail
which is created in WikiEditorHooks::getMagicWords and used by
the WikiEditor extension will return "mini" instead of "miniatur".

Change-Id: I4e9ad3f2e56e08eaf3006a1af4b1c9746cd55715
Documentation for page_props getter in ParserOutput

I would love to make this getter return null instead of false,
similar to getExtensionData() in the same class. A property that's
not set should be null. Not a boolean. This makes it impossible to
have boolean properties. But I can't change this because it's used
in extensions with "!== false" and such.

Change-Id: I2bc0bed1c58435d791f7a055bac2763a3411bb6f
Don't double-parse edit summaries

Fix a bug where edit summaries on permalinks would be parsed twice,
resulting in breakage of links, etc. in them. Follow-up to Ie19adfa5.

Change-Id: I3d7e70bb6d055184d36df35ef2e747ba32ad4ea0
Remove redundant filter for negative namespace ids in search preferences

Follows-up 5dc4dc099. MWNamespace::getValidNamespaces() filters these
out already.

Change-Id: Icad951fb9a4c4cb368cd994d1861dc2eff1f4ae0
Merge "Remove redundant filter for negative namespace ids in search preferences"
Fix documentation for Title::getCascadeProtectionSources and others

The documentation for Title::getCascadeProtectionSources was rendered
nonsensical in r79682, and somehow several following "documentation
cleanup" revisions failed to notice this while cleaning up this same
documentation string.

Fixing that led to fixing Title::getRestrictions and
Title::getAllRestrictions as well.

Change-Id: I48638e370c01fe5ef8ad7d3ebf7fb9aa4385bad7
Renamed $ipSet static variable in IP to something better

Change-Id: Ie7e049c9b114d2a76e1e8e985c3500bda4bbc0ef
Merge "Remove use of strencode() outside Database classes"
Merge "Made TransactionProfiler handle interlaced transactions better"