lhc/web/wiklou.git
7 years agoDocument thumbinner's block formatting context
Derk-Jan Hartman [Wed, 25 May 2016 21:27:00 +0000 (23:27 +0200)]
Document thumbinner's block formatting context

Document the side effect of setting overflow:hidden on thumbinner.
It's primary utility here is to clear the background of the block from
any floating content, avoiding potential overlap.

The property sets a new block formatting context.

Change-Id: I91b759cdd386cb648b1b704b0e7df708f6c4fa92

7 years agoMerge "registration: Add --config-prefix to convertExtensionToRegistration.php"
jenkins-bot [Thu, 26 May 2016 18:21:19 +0000 (18:21 +0000)]
Merge "registration: Add --config-prefix to convertExtensionToRegistration.php"

7 years agoMerge "Revert "Thumbnails: allow overflow inside thumbnails""
jenkins-bot [Thu, 26 May 2016 18:05:16 +0000 (18:05 +0000)]
Merge "Revert "Thumbnails: allow overflow inside thumbnails""

7 years agoMerge "mediawiki.special.apisandbox: Use module.exports instead of mw.special"
jenkins-bot [Thu, 26 May 2016 17:59:12 +0000 (17:59 +0000)]
Merge "mediawiki.special.apisandbox: Use module.exports instead of mw.special"

7 years agoMerge "mediawiki.special.recentchanges: Use module.exports instead of mw.special"
jenkins-bot [Thu, 26 May 2016 17:58:25 +0000 (17:58 +0000)]
Merge "mediawiki.special.recentchanges: Use module.exports instead of mw.special"

7 years agoregistration: Add --config-prefix to convertExtensionToRegistration.php
Brad Jorsch [Wed, 25 May 2016 16:42:41 +0000 (12:42 -0400)]
registration: Add --config-prefix to convertExtensionToRegistration.php

For converting extensions that use custom prefixes.

Change-Id: I4fcf7ff2af04e9a0367de368503f2c70d8fed959

7 years agoMerge "Follow-up 276c30e: Use the correct hex for the green we want"
jenkins-bot [Thu, 26 May 2016 17:52:32 +0000 (17:52 +0000)]
Merge "Follow-up 276c30e: Use the correct hex for the green we want"

7 years agomediawiki.special.apisandbox: Use module.exports instead of mw.special
Timo Tijhof [Thu, 26 May 2016 17:40:41 +0000 (18:40 +0100)]
mediawiki.special.apisandbox: Use module.exports instead of mw.special

mw.special.ApiSandbox is not used anywhere, and it's an easy candidate for
converting to the new module export pattern.

This removes the last use of the 'mediawiki.special.js' file, which violates
T92459 due to having styles.

Change-Id: I9b6972d763f34d50479099d4d726d1c77a91c223

7 years agomediawiki.special.recentchanges: Use module.exports instead of mw.special
Timo Tijhof [Thu, 26 May 2016 17:35:28 +0000 (18:35 +0100)]
mediawiki.special.recentchanges: Use module.exports instead of mw.special

This isn't generally used as a public method. The only reason it's exposed is
for an integration test to access it.

This commit and others prepare for removal of the 'mediawiki.special.js' file.
This script does nothing other than create "mw.special = {};". While that init
pattern is common in extensions and not wrong, 'mediawiki.special' violates
T92459 due to having styles. Given there's only script uses of it, it's easiest
to remove it in favour of the new module export pattern.

Change-Id: I2e78828828601e1160550efe02c07172ac32e985

7 years agoMerge "collation: Remove suppressWarnings() for getSortKey()"
jenkins-bot [Thu, 26 May 2016 17:33:13 +0000 (17:33 +0000)]
Merge "collation: Remove suppressWarnings() for getSortKey()"

7 years agoMerge "Avoid DBPerformance warnings on PURGE/TRACE requests"
jenkins-bot [Thu, 26 May 2016 16:45:07 +0000 (16:45 +0000)]
Merge "Avoid DBPerformance warnings on PURGE/TRACE requests"

7 years agocollation: Remove suppressWarnings() for getSortKey()
Ori Livneh [Mon, 23 May 2016 22:43:16 +0000 (15:43 -0700)]
collation: Remove suppressWarnings() for getSortKey()

Small optimization to IcuCollation::fetchFirstLetterData().

This used to suppress / restore warnings once per every letter of
every alphabet. The workaround for string casting and error
suppression is no longer needed as of PHP 5.3, in which the
bug was fixed.

Change-Id: Idd41a509858c0887df4f632b480b387bd74027b2

7 years agoFollow-up 276c30e: Use the correct hex for the green we want
James D. Forrester [Thu, 26 May 2016 16:38:23 +0000 (09:38 -0700)]
Follow-up 276c30e: Use the correct hex for the green we want

Bug: T136175
Change-Id: I4ce6010d55c361c56584a36ac252a68f0d2ee363

7 years agoChange button text for *Credentials special pages
Gergő Tisza [Thu, 26 May 2016 14:16:52 +0000 (14:16 +0000)]
Change button text for *Credentials special pages

Bug: T135779
Change-Id: If6c2edab6a574bc961e47c7ea04ec0ef18e36491

7 years agoresourceloader: Merge 'user.groups' into 'user' module
Timo Tijhof [Tue, 10 May 2016 19:47:04 +0000 (20:47 +0100)]
resourceloader: Merge 'user.groups' into 'user' module

This is with T92459 in mind to simplify the process of splitting
the 'user' module for the styles-only queue.

Consequences:

* Cached HTML isn't relevant in practice since there is no caching for logged-in
  users and this module is only for logged-in users. Even then, cached HTML will
  work and may happen as browsers re-use HTML responses when revisiting a
  privately cached page (after 304 Not Modified).
  Note that OutputPage (via isKnownEmpty) only actually tries to load 'user.groups'
  if the wiki has 'MediaWiki:Group-*.{js,css}' pages for the current user's groups.

  - Old style queue request will continue to ask for user.groups which is now a
    FileModule with no styles (simply concats the empty string to the bundle)
  - Old load() request will resolve with an empty function.

* The are no known dependants of 'user.groups'. If there are, they will work
  by proxy of it now being an empty module that just ensures 'user' is loaded.

* The security origin of 'user.groups' was USER_SITEWIDE. The origin of 'user'
  is lower (USER_INDIVIDUAL). Pages that are restricted to USER_SITEWIDE
  previously received user.groups, but won't anymore. This should be fine as
  OutputPage::reduceAllowedModules() is mainly used to either allow everything
  or restrict all the way down to CORE. The only exception is disallowUserJs()
  if $wgAllowSiteCSSOnRestrictedPages is enabled (T73621) but that edge case was
  made for Common.css, not Group-*.css.

Change-Id: I74cd2368ebd2989c5e1c22bea491a80beb0319dc

7 years agoAvoid DBPerformance warnings on PURGE/TRACE requests
Aaron Schulz [Fri, 20 May 2016 03:31:19 +0000 (20:31 -0700)]
Avoid DBPerformance warnings on PURGE/TRACE requests

The former sometimes show up in the logs as they were causing
CentralAuth to use the master but the expectations treated
the request as a GET request. This makes things more
consistent.

Bug: T92357
Change-Id: I55bf3139c68f5926fe67a51cf0eb1b2ffe55d17b

7 years agoMerge "Use correct module name for stats in executeActionWithErrorHandling()"
jenkins-bot [Wed, 25 May 2016 23:31:53 +0000 (23:31 +0000)]
Merge "Use correct module name for stats in executeActionWithErrorHandling()"

7 years agoMerge "Restore Userlogin error/warning URL parameter"
jenkins-bot [Wed, 25 May 2016 22:12:27 +0000 (22:12 +0000)]
Merge "Restore Userlogin error/warning URL parameter"

7 years agoRevert "Thumbnails: allow overflow inside thumbnails"
Derk-Jan Hartman [Wed, 25 May 2016 21:23:48 +0000 (23:23 +0200)]
Revert "Thumbnails: allow overflow inside thumbnails"

This reverts commit 2964c2799f0c19ac4c765f025a2998a0f3baeff0.

Bug: T133439
Change-Id: Id16420e8f5fd73e31cba2d5415ae9c1730a5a32c

7 years agoMerge "Param &$html for the "LinkBegin" hook needs to be null if $text is null"
jenkins-bot [Wed, 25 May 2016 21:17:18 +0000 (21:17 +0000)]
Merge "Param &$html for the "LinkBegin" hook needs to be null if $text is null"

7 years agoRestore Userlogin error/warning URL parameter
Gergő Tisza [Wed, 25 May 2016 20:04:41 +0000 (20:04 +0000)]
Restore Userlogin error/warning URL parameter

I accidentally removed this when rewriting for AuthManager.

Also change an ID into a CSS class for now since HTMLInfoField
does not support IDs.

Bug: T135775
Change-Id: I5663a02c9809dd573087a4a528702c949b938970

7 years agoMerge "Do not use $wgUser in Linker/LinkRenderer when sessions are disabled"
jenkins-bot [Wed, 25 May 2016 20:22:23 +0000 (20:22 +0000)]
Merge "Do not use $wgUser in Linker/LinkRenderer when sessions are disabled"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 25 May 2016 19:59:28 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I7108f988a2c97e99bb3f889d0ecea55fceb0d95f

7 years agoDo not use $wgUser in Linker/LinkRenderer when sessions are disabled
Gergő Tisza [Wed, 25 May 2016 19:54:47 +0000 (19:54 +0000)]
Do not use $wgUser in Linker/LinkRenderer when sessions are disabled

When MW_NO_SESSION is set, getting the user options for $wgUser will
result in an error. Check for that in the service definition, and
reuse that check in Linker.

Also removed an unused use clause.

Bug: T136124
Change-Id: Id6448d12e8f4a8a94852980e5eb6ccb202066822

7 years agoUse correct module name for stats in executeActionWithErrorHandling()
Aaron Schulz [Wed, 25 May 2016 19:31:19 +0000 (12:31 -0700)]
Use correct module name for stats in executeActionWithErrorHandling()

Change-Id: I7d300525c32877d6fcc940962c93b932dc4c9181

7 years agoParam &$html for the "LinkBegin" hook needs to be null if $text is null
Marius Hoch [Wed, 25 May 2016 19:25:12 +0000 (21:25 +0200)]
Param &$html for the "LinkBegin" hook needs to be null if $text is null

To keep b/c with the old implementation.

Change-Id: I5fff92f47babe890fe0d3726dba6f60cc75ee708

7 years agoMerge "filerepo: Add missing quote back to LocalFileLockError message"
jenkins-bot [Wed, 25 May 2016 18:36:11 +0000 (18:36 +0000)]
Merge "filerepo: Add missing quote back to LocalFileLockError message"

7 years agofilerepo: Add missing quote back to LocalFileLockError message
Aaron Schulz [Tue, 24 May 2016 09:55:16 +0000 (02:55 -0700)]
filerepo: Add missing quote back to LocalFileLockError message

Follows-up e724d14495.

Change-Id: I48e304a307d3c0427f797a382dc23347bb7e914f

7 years agoFix regression: text color in `.mw-search-result-data`
Volker E [Wed, 25 May 2016 16:02:38 +0000 (09:02 -0700)]
Fix regression: text color in `.mw-search-result-data`

Follow-up to I2ba04cc3ad9898c17fee3c65bb3bead834c3a1fd where `green` in
`.mw-search-result-data` was transcripted falsely into
`#0f0` instead of `#008000`.

Bug: T136175
Change-Id: I5d55718510650634a718d688a0e0698355097c6c

7 years agoUpdate es5-shim to v4.5.8
James D. Forrester [Mon, 23 May 2016 23:33:57 +0000 (16:33 -0700)]
Update es5-shim to v4.5.8

Project site
* https://github.com/es-shims/es5-shim

File source
* https://github.com/es-shims/es5-shim/tree/v4.5.8

Changelog
* https://github.com/es-shims/es5-shim/blob/v4.5.8/CHANGES

Change-Id: I4a6a703d7db00d7eaaeb1365c1c19f3ae055c440

7 years agoMerge "Remove explicit tabindex from diff links"
jenkins-bot [Wed, 25 May 2016 13:13:33 +0000 (13:13 +0000)]
Merge "Remove explicit tabindex from diff links"

7 years agoAdd LBFactory::closeAll() method
Brion Vibber [Tue, 24 May 2016 15:32:12 +0000 (08:32 -0700)]
Add LBFactory::closeAll() method

Needed to allow long-running background tasks to close out database
connections in a way that allows them to reopen later when needed
again.

Bug: T97641
Change-Id: I4974b691392d4225b15e7b771a28a2cefeb9d8e4

7 years agoMerge "Tidy: Add mw-empty-elt class"
jenkins-bot [Wed, 25 May 2016 03:15:00 +0000 (03:15 +0000)]
Merge "Tidy: Add mw-empty-elt class"

7 years agoMerge "Update OOjs UI to v0.17.3"
Bartosz Dziewoński [Wed, 25 May 2016 01:10:02 +0000 (01:10 +0000)]
Merge "Update OOjs UI to v0.17.3"

7 years agoTidy: Add mw-empty-elt class
Tim Starling [Wed, 25 May 2016 00:47:06 +0000 (10:47 +1000)]
Tidy: Add mw-empty-elt class

In hindsight, it was pretty silly to put the element name in the class.
This is to support an upcoming Html5Depurate change.

Change-Id: I38ddcdb7daf8f0e2bde9e019457fd4192d86e02b

7 years agoUpdate OOjs UI to v0.17.3
James D. Forrester [Tue, 24 May 2016 22:53:46 +0000 (15:53 -0700)]
Update OOjs UI to v0.17.3

Release notes:
 https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.17.3

Change-Id: I3fe38754c18a83554593479ea1b01f8a60144435

7 years agoMerge "Support non-replicating DB clusters for static datasets"
jenkins-bot [Tue, 24 May 2016 23:59:24 +0000 (23:59 +0000)]
Merge "Support non-replicating DB clusters for static datasets"

7 years agoRemove explicit tabindex from diff links
Derk-Jan Hartman [Tue, 24 May 2016 18:16:07 +0000 (20:16 +0200)]
Remove explicit tabindex from diff links

These were added to Special:RecentChanges in 2004, but it doesn't
match what we do in any of the other lists. For accessibility
purposes, in flow indexing is preferred these days, or alternatively
a JS controlled roving tabindex, but this was neither.

Bug: T116127
Change-Id: Id455fafe4bdea40fb5988bdec14eed672844c8e3

7 years agoMerge "Simplify code for updating tooltips with accesskey tips"
jenkins-bot [Tue, 24 May 2016 21:10:08 +0000 (21:10 +0000)]
Merge "Simplify code for updating tooltips with accesskey tips"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 24 May 2016 20:21:58 +0000 (22:21 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3941ec39a42414aa051ab58922267e143c5b30f1

7 years agoRevDel: Fix ChangeTags for archived items
Matthew Flaschen [Thu, 19 May 2016 21:10:35 +0000 (17:10 -0400)]
RevDel: Fix ChangeTags for archived items

Bug: T128980
Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc

7 years agoMerge "Revert "Convert Special:NewFiles to use OOUI.""
jenkins-bot [Tue, 24 May 2016 18:31:55 +0000 (18:31 +0000)]
Merge "Revert "Convert Special:NewFiles to use OOUI.""

7 years agoRevert "Convert Special:NewFiles to use OOUI."
Bartosz Dziewoński [Tue, 24 May 2016 18:05:25 +0000 (18:05 +0000)]
Revert "Convert Special:NewFiles to use OOUI."

Removing the 'hidden' fields from the HTMLForm definition
means that they are no longer preserved when the form is
resubmitted. I think that's a problematic regression.

This reverts commit 179e2f892d7811fa5613e1d6e0d5626e52c93b31.

Change-Id: Ib84dca5119b7a5270b349c5d1164541a5f082d96

7 years agoMerge "Convert Special:NewFiles to use OOUI."
jenkins-bot [Tue, 24 May 2016 16:41:45 +0000 (16:41 +0000)]
Merge "Convert Special:NewFiles to use OOUI."

7 years agoMerge "Convert Special:WithoutInterwiki to OOUI"
jenkins-bot [Tue, 24 May 2016 16:41:40 +0000 (16:41 +0000)]
Merge "Convert Special:WithoutInterwiki to OOUI"

7 years agoMerge "Document what User::newSystemUser()'s "stealing" does"
jenkins-bot [Tue, 24 May 2016 15:27:07 +0000 (15:27 +0000)]
Merge "Document what User::newSystemUser()'s "stealing" does"

7 years agoMerge "Improve some documentation of AuthManager's additions"
jenkins-bot [Tue, 24 May 2016 15:27:02 +0000 (15:27 +0000)]
Merge "Improve some documentation of AuthManager's additions"

7 years agoDocument what User::newSystemUser()'s "stealing" does
Brad Jorsch [Tue, 24 May 2016 15:05:47 +0000 (11:05 -0400)]
Document what User::newSystemUser()'s "stealing" does

Also improves a few other comments in the method.

Change-Id: I87e293c0ef487ef15bee8fbe1085d530c99a7b07

7 years agoMerge "Disable CAS check when saving TestUser data."
jenkins-bot [Tue, 24 May 2016 11:13:44 +0000 (11:13 +0000)]
Merge "Disable CAS check when saving TestUser data."

7 years agoDisable CAS check when saving TestUser data.
daniel [Thu, 19 May 2016 12:51:04 +0000 (14:51 +0200)]
Disable CAS check when saving TestUser data.

During testing, we are not worried about data loss, so we can safely
bypass the CAS check when setting up a test fixture.

This change was added to address sporadic test failures like the following:

18:03:38 1) ApiEchoMarkReadTest::testMarkReadWithList
18:03:38 MWException: CAS update failed on user_touched for user ID '2' (read from slave); the version of the user to be saved is older than the current version.
18:03:38
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/includes/user/User.php:3931
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/includes/TestUser.php:83
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/includes/api/ApiTestCase.php:30
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/Echo/tests/phpunit/api/ApiEchoMarkReadTest.php:11
18:03:38 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/tests/phpunit/MediaWikiTestCase.php:370

Bug: T131178
Change-Id: I99b43e0db85bc2c1cd335c82971df4e95520d34b

7 years agoAdd the LockManager error to LocalFileLockError exceptions
Aaron Schulz [Tue, 24 May 2016 07:06:36 +0000 (00:06 -0700)]
Add the LockManager error to LocalFileLockError exceptions

Change-Id: Ibfa7312993806554f7939b4f5692e30714f71304

7 years agoMerge "Add LinkRenderer (rewrite of Linker::link())"
jenkins-bot [Tue, 24 May 2016 03:29:32 +0000 (03:29 +0000)]
Merge "Add LinkRenderer (rewrite of Linker::link())"

7 years agoMerge "Avoid invidual LinkCache lookups in Linker::makeBrokenImageLinkObj()"
jenkins-bot [Tue, 24 May 2016 03:29:28 +0000 (03:29 +0000)]
Merge "Avoid invidual LinkCache lookups in Linker::makeBrokenImageLinkObj()"

7 years agoMerge "Cleanup Special:PrefixIndex::showPrefixChunk()"
jenkins-bot [Tue, 24 May 2016 03:19:35 +0000 (03:19 +0000)]
Merge "Cleanup Special:PrefixIndex::showPrefixChunk()"

7 years agoMerge "TraditionalImageGallery: Preload Titles being linked into LinkCache"
jenkins-bot [Tue, 24 May 2016 03:07:15 +0000 (03:07 +0000)]
Merge "TraditionalImageGallery: Preload Titles being linked into LinkCache"

7 years agoMerge "Remove 'noclasses' from Linker::linkKnown() defaults"
jenkins-bot [Tue, 24 May 2016 03:07:01 +0000 (03:07 +0000)]
Merge "Remove 'noclasses' from Linker::linkKnown() defaults"

7 years agoSimplify code for updating tooltips with accesskey tips
Bartosz Dziewoński [Thu, 19 May 2016 17:22:06 +0000 (19:22 +0200)]
Simplify code for updating tooltips with accesskey tips

After 79e095fd, we can assume that if this code runs, then the fast
querySelectorAll() is available, and therefore jQuery will use it
rather than its polyfill.

This completes the fix for T60255 started in ed85c136.

Change-Id: I6b905ffb8ccf791d0edebfc15f2a4f1d1a57fbe1

7 years agoMerge "Lowered incrTableUpdate() batch size to $wgUpdateRowsPerQuery"
jenkins-bot [Mon, 23 May 2016 22:26:18 +0000 (22:26 +0000)]
Merge "Lowered incrTableUpdate() batch size to $wgUpdateRowsPerQuery"

7 years agoMerge "Remove unused import in MediaWikiServices"
jenkins-bot [Mon, 23 May 2016 21:27:51 +0000 (21:27 +0000)]
Merge "Remove unused import in MediaWikiServices"

7 years agoMerge "Batch updateNotificationTimestamp() UPDATE queries (without wl_id)"
jenkins-bot [Mon, 23 May 2016 21:06:26 +0000 (21:06 +0000)]
Merge "Batch updateNotificationTimestamp() UPDATE queries (without wl_id)"

7 years agoMerge "RollbackAction: Implement AJAX interface and require POST"
jenkins-bot [Mon, 23 May 2016 21:02:50 +0000 (21:02 +0000)]
Merge "RollbackAction: Implement AJAX interface and require POST"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 23 May 2016 20:00:48 +0000 (22:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I00c9bd3bf3a03e38b1cc2573212bfae257d3dc4c

7 years agoBatch updateNotificationTimestamp() UPDATE queries (without wl_id)
umherirrender [Mon, 23 May 2016 18:49:21 +0000 (20:49 +0200)]
Batch updateNotificationTimestamp() UPDATE queries (without wl_id)

The new primary key is not usable in production (T130067), so batch the
query using the old where condition.

Some code ideas from I3dbe1de4cf39499728a2077a71157d4bcc203e44

Bug: T134613
Change-Id: Ic12926a5166f7578a1136c7944d883c2fe1f3b3a

7 years agoRollbackAction: Implement AJAX interface and require POST
Timo Tijhof [Tue, 29 Sep 2015 02:53:20 +0000 (19:53 -0700)]
RollbackAction: Implement AJAX interface and require POST

Similar to WatchAction (converted in commit 77cdf1919).

* Make FormAction::getFormFields not abstract.
  In most cases this will just be an empty array.

* Convert RollbackAction from FormlessAction to FormAction and implement the
  required error handling scenarios (mostly moved out of from the old method, or
  duplicated from the WikiPage method where necessary).

* In most cases the in-between form is never used since a JavaScript handler
  takes over the link and uses the API over AJAX instead. In the no-js fallback
  (as well as for any existing tokenless rollback links) copy the GET parameters
  into the form for re-submission as POST (plus token, added by HTMLForm).

* Remove the distinction between WebUI and API tokens. This stronger token salt made it
  unnecessarily complex and was only there because it used GET until now. This streamlining of
  tokens matches what we already do for 'watch', 'edit', 'patrol' and other actions.

* Fix form submission bugs when 'from' query parameter is missing.

  - Ensure the required 'from' query parameter is present before showing a form.
    No need for the user to submit a form we know will fail.

  - Plain GET request to action=rollback (with no parameters) is now a 400 Bad Request
    instead of a form that would fail when submitted.

  - Submitting the form without 'form' field now correctly says why it failed.
    Previously it emitted a session error, which was a lie.

Bug: T88044
Change-Id: Ia457802fec2e90573c8e7d552bc1f3cee258f10b

7 years agoAdd LinkRenderer (rewrite of Linker::link())
Kunal Mehta [Thu, 21 Apr 2016 20:13:21 +0000 (13:13 -0700)]
Add LinkRenderer (rewrite of Linker::link())

This is a rewrite of Linker::link() to a non-static, LinkTarget-based
interface. Users of plain Linker::link() with no options can use the
LinkRenderer instance provided by MediaWikiServices. Others that
have specific options should create and configure their own instance,
which can be used to create as many links as necessary.

The main entrypoints for making links are:
* ->makeLink( $target, $text, $attribs, $query );
* ->makeKnownLink( $target, $text, $attribs, $query );
* ->makeBrokenLink( $target, $text, $attribs, $query );

The order of the parameters are the same as Linker::link(), except
$options are now part of the LinkRenderer instance, and
known/broken status requires calling the function explicitly.
Additionally, instead of passing in raw $html for the link text, the
$text parameter will automatically be escaped unless it is specially
marked as safe HTML using the MediaWiki\Linker\HtmlArmor class.

The LinkBegin and LinkEnd hooks are now deprecated, but still function
for backwards-compatability. Clients should migrate to the nearly-
equivalent LinkRendererBegin and LinkRendererEnd hooks.
The main differences between the hooks are:
* Passing HtmlPageLinkRenderer object instead of deprecated DummyLinker
* Using LinkTarget instead of Title
* Begin hook can no longer change known/broken status of link. Use the
TitleIsAlwaysKnown hook for that.
* $options are no longer passed, they can be read (but shouldn't be
modified!) from the LinkRenderer object.

Bug: T469
Change-Id: I057cc86ae6404a080aa3c8e0e956ecbb10a897d5

7 years agoDo not count 0-load servers in getMaxLag()
Aaron Schulz [Sat, 21 May 2016 10:40:03 +0000 (03:40 -0700)]
Do not count 0-load servers in getMaxLag()

JobRunner::run() and API endpoints use this to bail out if
lag is too high. A dedicated "vslow" host with no normal
load should not trigger this logic, for example.

Bug: T135809
Change-Id: If6879aa1a4379857779a4eacf2a8b7400c0b434f

7 years agoMerge "Add some missing MW version documentation"
jenkins-bot [Mon, 23 May 2016 18:02:33 +0000 (18:02 +0000)]
Merge "Add some missing MW version documentation"

7 years agoMerge "Log autocreation attempts in SessionManager"
jenkins-bot [Mon, 23 May 2016 17:53:38 +0000 (17:53 +0000)]
Merge "Log autocreation attempts in SessionManager"

7 years agoAdd some missing MW version documentation
Gergő Tisza [Mon, 23 May 2016 13:20:41 +0000 (13:20 +0000)]
Add some missing MW version documentation

* deprecate $wgAuth
* add @since for Status::getStatusValue

Change-Id: Ia11ef1e4788297ffea0a2beb4da731c7e771958c

7 years agoBump mediawiki version in PHPVersionCheck.php to 1.28
Paladox [Sun, 22 May 2016 18:01:43 +0000 (19:01 +0100)]
Bump mediawiki version in PHPVersionCheck.php to 1.28

We bumped to version 1.28 in mediawiki recently but seems we forgot to do
it in PHPVersionCheck.php.

Change-Id: I2a455669b68225fd9d6772c8482559c220d433b5

7 years agoMerge "add LanguageTest::testEquals for Id7ed6a21c"
jenkins-bot [Mon, 23 May 2016 16:07:06 +0000 (16:07 +0000)]
Merge "add LanguageTest::testEquals for Id7ed6a21c"

7 years agoMerge "Language: Introduce new method equals( Language $lang )"
jenkins-bot [Mon, 23 May 2016 16:03:50 +0000 (16:03 +0000)]
Merge "Language: Introduce new method equals( Language $lang )"

7 years agoMerge "build: Enforce stylelints on function calls"
jenkins-bot [Mon, 23 May 2016 15:23:26 +0000 (15:23 +0000)]
Merge "build: Enforce stylelints on function calls"

7 years agoadd LanguageTest::testEquals for Id7ed6a21c
daniel [Mon, 23 May 2016 14:45:06 +0000 (16:45 +0200)]
add LanguageTest::testEquals for Id7ed6a21c

Change-Id: I99ea4c51bfc5245eab0bcca73870c56a6fab2c43

7 years agoMerge "Remove unused messages in the installer"
jenkins-bot [Mon, 23 May 2016 07:15:00 +0000 (07:15 +0000)]
Merge "Remove unused messages in the installer"

7 years agoMerge "Add pages with ignored restricted {{DISPLAYTITLE}}s to a tracking category"
jenkins-bot [Sun, 22 May 2016 21:17:10 +0000 (21:17 +0000)]
Merge "Add pages with ignored restricted {{DISPLAYTITLE}}s to a tracking category"

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 22 May 2016 19:58:03 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Icdeee9242c04b5417eb60a2c268e88d9c0a40896

7 years agoFix autoload.php sort order
Florian [Sat, 21 May 2016 23:25:41 +0000 (01:25 +0200)]
Fix autoload.php sort order

By running maintenance/generateLocalAutoload.php.

Change-Id: I54324c9c3da201a8ccf3be8bd6a2e9c026936253

7 years agoCoreParserFunctions: Return 0 from {{PAGESIZE:}} when length is unknown
Bartosz Dziewoński [Mon, 16 May 2016 18:12:12 +0000 (20:12 +0200)]
CoreParserFunctions: Return 0 from {{PAGESIZE:}} when length is unknown

Revision::getSize() might return null when the revision.rev_len field
is null. That should never happen normally (the field should get
backfilled as part of the update process), but we've also had a bug
where rev_len was not being recorded for empty pages (see T135414 for
details). It's saner to return a number here rather than empty string,
and 0 should actually be correct for all pages affected by that issue.

Bug: T20998
Change-Id: Ie12f0be24f00aaf8b90b25c4921a97df3b789369

7 years agoLogEventsList::showLogExtract: allow providing custom URL parameters for "view full...
Glaisher [Fri, 13 May 2016 17:44:34 +0000 (22:44 +0500)]
LogEventsList::showLogExtract: allow providing custom URL parameters for "view full log" link

Optional 'extraUrlParams' parameter has been added. This is useful for example when you want to
link to subtypes: Special:Log/foo?subtype=bar.
Also change Special:Log link to linkKnown() instead of link() while at it.

Change-Id: I87a6403eb0639c4d93e49d6946b85650f478107b

7 years agoAdd pages with ignored restricted {{DISPLAYTITLE}}s to a tracking category
Glaisher [Sun, 22 May 2016 17:15:34 +0000 (22:15 +0500)]
Add pages with ignored restricted {{DISPLAYTITLE}}s to a tracking category

Added to "Pages with ignored display titles" category
(message key: "restricted-displaytitle-ignored")

Follow up to I6ae6d5d0e567ba9c86e46c32240ee51a2ca5d8d1

Bug: T135949
Change-Id: I9e0f8b1e3d39a62c13191bea6734fb136e976e0c

7 years agoRemove unused messages in the installer
Paladox [Sun, 22 May 2016 11:16:08 +0000 (12:16 +0100)]
Remove unused messages in the installer

Removes messages:

config-db-charset
https://github.com/wikimedia/mediawiki/search?utf8=%E2%9C%93&q=config-db-charset&type=Code

config-charset-mysql5-binary
https://github.com/wikimedia/mediawiki/search?utf8=%E2%9C%93&q=config-charset-mysql5-binary&type=Code

config-charset-mysql5
https://github.com/wikimedia/mediawiki/search?utf8=%E2%9C%93&q=config-charset-mysql5&type=Code

config-charset-mysql4
https://github.com/wikimedia/mediawiki/search?utf8=%E2%9C%93&q=config-charset-mysql4&type=Code

config-charset-help
https://github.com/wikimedia/mediawiki/search?utf8=%E2%9C%93&q=config-charset-help&type=Code

Shows them as all being unused.

Plus we doint use mysql 4 any more nor support it.

Change-Id: I369e4f6d3fd934398d978d3fa8c0da6a62bd8a0f

7 years agoAdd @since tags to each LinkTarget method.
addshore [Thu, 19 May 2016 10:44:20 +0000 (11:44 +0100)]
Add @since tags to each LinkTarget method.

All current methods were introduced in 1.27

Change-Id: I777a251bae75e5b040f0ef9f608e91022d3e70d7

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 21 May 2016 19:59:59 +0000 (21:59 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I81eef8d9acdd8a2f0e0adeca28bfad36882e0fe9

7 years agoConvert Special:NewFiles to use OOUI.
Sethakill [Wed, 18 May 2016 20:27:08 +0000 (22:27 +0200)]
Convert Special:NewFiles to use OOUI.

Other changes:
* moved form from pager
* added FormOptions

Bug: T135680
Change-Id: I1d9c0a761fd3d71fe58c2621c9766c2c6dd39dcb

7 years agoAdd missing samp tags and closing kbd tag
Amire80 [Sat, 21 May 2016 10:10:29 +0000 (13:10 +0300)]
Add missing samp tags and closing kbd tag

In:
* apihelp-clientlogin-example-login2
* api-help-authmanager-general-usage

Also fix a typo in api-help-authmanager-general-usage.

Change-Id: I2a9f6c46c992fda9a21068dd789043d5ef626311

7 years agoMerge "Revert "Enable AuthManager by default""
jenkins-bot [Fri, 20 May 2016 23:08:21 +0000 (23:08 +0000)]
Merge "Revert "Enable AuthManager by default""

7 years agoRevert "Enable AuthManager by default"
Chad [Fri, 20 May 2016 22:56:20 +0000 (22:56 +0000)]
Revert "Enable AuthManager by default"

Breaking some extensions at the moment in unit testing,
needs more cleanup first

This reverts commit 485e0548e9cd784a91538730ba6ae8ec1708d71e.

Change-Id: Icdde13df71204ff99b8ef60bd9ebf356c40615b9

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 20 May 2016 19:56:30 +0000 (21:56 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia6f9b128f9747919c7263200b639ef8207079f3f

7 years agoregistration: Ignore short variables in convertExtensionToRegistration
Gergő Tisza [Fri, 20 May 2016 14:27:56 +0000 (14:27 +0000)]
registration: Ignore short variables in convertExtensionToRegistration

substr returns false when the string is shorter than the initial
position, which makes array_key_exists freak out.

Change-Id: I38c2dd3a1ae5d700d66ff590dda4be67e4dc5514

7 years agoEditPage: Use localized special page links for 'anoneditwarning'
Fomafix [Thu, 19 May 2016 20:36:02 +0000 (20:36 +0000)]
EditPage: Use localized special page links for 'anoneditwarning'

This avoids a redirect from the generic special page to the localized special page.

Change-Id: Ica7995839b67a809dd9dcc12298209bee300e54b

7 years agoUse InterwikiLookup in Title.
daniel [Thu, 12 May 2016 18:44:04 +0000 (20:44 +0200)]
Use InterwikiLookup in Title.

This makes the use of the global InterwikiLookup singleton more explicit
in the Title class. It does not remove the strong binding between Title
and InterwikiLookup.

Change-Id: Iaeb7c418af17fe19f170487f5364040da6052699

7 years agoFix various phpcs error from last security patches
umherirrender [Fri, 20 May 2016 18:11:58 +0000 (20:11 +0200)]
Fix various phpcs error from last security patches

Found by tests:
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-trusty/1069/console

Breaking merges

Change-Id: If01b94705cd7b939ac380053730b1b602c838a8e

7 years agoAdd rel="noreferrer noopener" when target attribute would open window
Brian Wolff [Mon, 25 Apr 2016 18:08:46 +0000 (14:08 -0400)]
Add rel="noreferrer noopener" when target attribute would open window

noreferrer is used as support for noopener is very limited.
This is to prevent the attack detailed at
https://mathiasbynens.github.io/rel-noopener/ where you can
navigate the parent window, even if the new window is a cross-origin.

Bug: T133507
Change-Id: I6e4ab938861e246ff44048077b94847e303f1859

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
7 years agoSECURITY: Rate limit moves via the API
Brad Jorsch [Sun, 17 Apr 2016 14:32:56 +0000 (10:32 -0400)]
SECURITY: Rate limit moves via the API

While rate limiting has been applied to moves via the web UI since rate
limiting was first added, it appears that it was overlooked when ApiMove
was created.

This follows the same model as is followed by the web UI: each
submission to ApiMove is one "hit" for the rate limiter, even though
that submission might result in multiple pages being moved (e.g. the
page, its talk page, and its subpages) depending on the options and user
rights.

Bug: T132874
Change-Id: I564d8bfcc7dd3ad6d92dbbc33519a589697c0d4e

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
7 years agoUse pool counter for generating large diffs to prevent DoS.
Max Semenik [Tue, 12 Apr 2016 20:52:34 +0000 (16:52 -0400)]
Use pool counter for generating large diffs to prevent DoS.

Bug: T130947
Change-Id: If560844664051c04e01b954377b4bdfdb744d13f

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
7 years agoEnforce upper limit on invocations of wfShellExec()
Darian Anthony Patrick [Tue, 19 Apr 2016 17:53:39 +0000 (10:53 -0700)]
Enforce upper limit on invocations of wfShellExec()

Enforce an upper limit of 100,000 bytes on commands executed via
wfShellExec() to avoid HHVM crash resulting from process spawned with
argument exceeding MAX_ARG_STRLEN, as defined in binfmts.h

Bug: T129506

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
7 years agoSECURITY: Throw exception on unknown hash algorithm
csteipp [Mon, 22 Feb 2016 20:50:40 +0000 (12:50 -0800)]
SECURITY: Throw exception on unknown hash algorithm

To prevent a bad password configuration from accidentally allowing
users to bypass authentication, throw an exception if either hash or
hash_pbkdf2 return false.

Also, ensure md5() returned a sane hash.

Bug: T127420
Change-Id: If3664941236e4065eb8db11b0a211fd6210de631

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
7 years agoCanonicalize usernames before rate limiting logins
Brian Wolff [Mon, 9 May 2016 07:51:01 +0000 (03:51 -0400)]
Canonicalize usernames before rate limiting logins

Bug: T127114
Change-Id: I020cecf345c6bad4f461b70203f0bd29792de1f8

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>
7 years agoSECURITY: RawAction: Vary on the usual headers
Brad Jorsch [Sun, 31 Jan 2016 20:43:00 +0000 (15:43 -0500)]
SECURITY: RawAction: Vary on the usual headers

This avoids edge cases where the user isn't logged in but we still need
varying for proper cache behavior.

Bug: T125283
Change-Id: I43cde3a48371e62a16bda1291b1b51986e60fe4c

Signed-off-by: Chad Horohoe <chadh@wikimedia.org>