Commit graph

43498 commits

Author SHA1 Message Date
Aaron Schulz
542640f4e2 Use correct module name for stats in executeActionWithErrorHandling()
Change-Id: I7d300525c32877d6fcc940962c93b932dc4c9181
2016-05-25 12:31:19 -07:00
jenkins-bot
b7a3feff1b Merge "Remove explicit tabindex from diff links" 2016-05-25 13:13:33 +00:00
Brion Vibber
8749184856 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
2016-05-25 07:43:23 +00:00
jenkins-bot
9e23ffa395 Merge "Support non-replicating DB clusters for static datasets" 2016-05-24 23:59:24 +00:00
Derk-Jan Hartman
17221b41cb 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
2016-05-25 00:46:54 +02:00
Translation updater bot
0a26e28db1 Localisation updates from https://translatewiki.net.
Change-Id: I3941ec39a42414aa051ab58922267e143c5b30f1
2016-05-24 22:21:58 +02:00
Matthew Flaschen
77884372c0 RevDel: Fix ChangeTags for archived items
Bug: T128980
Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc
2016-05-24 18:33:25 +00:00
jenkins-bot
045357380d Merge "Revert "Convert Special:NewFiles to use OOUI."" 2016-05-24 18:31:55 +00:00
Bartosz Dziewoński
b7b10b415e 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 179e2f892d.

Change-Id: Ib84dca5119b7a5270b349c5d1164541a5f082d96
2016-05-24 18:05:25 +00:00
jenkins-bot
5cbada9dea Merge "Convert Special:NewFiles to use OOUI." 2016-05-24 16:41:45 +00:00
jenkins-bot
19fe074b65 Merge "Convert Special:WithoutInterwiki to OOUI" 2016-05-24 16:41:40 +00:00
jenkins-bot
10c67b652c Merge "Document what User::newSystemUser()'s "stealing" does" 2016-05-24 15:27:07 +00:00
jenkins-bot
eaae000bd6 Merge "Improve some documentation of AuthManager's additions" 2016-05-24 15:27:02 +00:00
Brad Jorsch
5cbf5be37a Document what User::newSystemUser()'s "stealing" does
Also improves a few other comments in the method.

Change-Id: I87e293c0ef487ef15bee8fbe1085d530c99a7b07
2016-05-24 11:05:47 -04:00
jenkins-bot
0df66aa5eb Merge "Disable CAS check when saving TestUser data." 2016-05-24 11:13:44 +00:00
daniel
8f4587b343 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
2016-05-24 12:58:22 +02:00
Aaron Schulz
e724d14495 Add the LockManager error to LocalFileLockError exceptions
Change-Id: Ibfa7312993806554f7939b4f5692e30714f71304
2016-05-24 00:06:36 -07:00
jenkins-bot
8b9584646b Merge "Add LinkRenderer (rewrite of Linker::link())" 2016-05-24 03:29:32 +00:00
jenkins-bot
f8cc99ea98 Merge "Avoid invidual LinkCache lookups in Linker::makeBrokenImageLinkObj()" 2016-05-24 03:29:28 +00:00
jenkins-bot
2d82ed577c Merge "Cleanup Special:PrefixIndex::showPrefixChunk()" 2016-05-24 03:19:35 +00:00
jenkins-bot
b6e954a162 Merge "TraditionalImageGallery: Preload Titles being linked into LinkCache" 2016-05-24 03:07:15 +00:00
jenkins-bot
9a309c92e6 Merge "Remove 'noclasses' from Linker::linkKnown() defaults" 2016-05-24 03:07:01 +00:00
jenkins-bot
e04a717196 Merge "Lowered incrTableUpdate() batch size to $wgUpdateRowsPerQuery" 2016-05-23 22:26:18 +00:00
jenkins-bot
a5c5795c74 Merge "Remove unused import in MediaWikiServices" 2016-05-23 21:27:51 +00:00
jenkins-bot
55892ada51 Merge "Batch updateNotificationTimestamp() UPDATE queries (without wl_id)" 2016-05-23 21:06:26 +00:00
jenkins-bot
4bd688c442 Merge "RollbackAction: Implement AJAX interface and require POST" 2016-05-23 21:02:50 +00:00
Translation updater bot
5bff74281b Localisation updates from https://translatewiki.net.
Change-Id: I00c9bd3bf3a03e38b1cc2573212bfae257d3dc4c
2016-05-23 22:00:48 +02:00
umherirrender
14b888c515 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
2016-05-23 21:16:38 +02:00
Timo Tijhof
9af38c046c 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
2016-05-23 20:00:48 +01:00
Kunal Mehta
67e62c0b25 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
2016-05-23 12:00:09 -07:00
Aaron Schulz
e2c75bb3bd 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
2016-05-23 18:42:56 +00:00
jenkins-bot
e47f857e3f Merge "Add some missing MW version documentation" 2016-05-23 18:02:33 +00:00
jenkins-bot
0421ab1e9e Merge "Log autocreation attempts in SessionManager" 2016-05-23 17:53:38 +00:00
Gergő Tisza
9d4abcb025 Add some missing MW version documentation
* deprecate $wgAuth
* add @since for Status::getStatusValue

Change-Id: Ia11ef1e4788297ffea0a2beb4da731c7e771958c
2016-05-23 19:46:35 +02:00
Paladox
bd473b9642 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
2016-05-23 16:27:26 +00:00
jenkins-bot
67a97fced6 Merge "Language: Introduce new method equals( Language $lang )" 2016-05-23 16:03:50 +00:00
jenkins-bot
bd2c495b99 Merge "Remove unused messages in the installer" 2016-05-23 07:15:00 +00:00
jenkins-bot
408e9de28c Merge "Add pages with ignored restricted {{DISPLAYTITLE}}s to a tracking category" 2016-05-22 21:17:10 +00:00
Translation updater bot
dfabb9e95f Localisation updates from https://translatewiki.net.
Change-Id: Icdeee9242c04b5417eb60a2c268e88d9c0a40896
2016-05-22 21:58:03 +02:00
Bartosz Dziewoński
06b9d0af42 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
2016-05-22 18:39:11 +00:00
Glaisher
9653f9b1d5 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
2016-05-22 18:04:45 +00:00
Glaisher
8af59afa0d 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
2016-05-22 17:19:46 +00:00
Paladox
4b320e79af 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
2016-05-22 15:33:39 +00:00
addshore
995c89b0fa Add @since tags to each LinkTarget method.
All current methods were introduced in 1.27

Change-Id: I777a251bae75e5b040f0ef9f608e91022d3e70d7
2016-05-22 12:29:01 +00:00
Translation updater bot
88754ec791 Localisation updates from https://translatewiki.net.
Change-Id: I81eef8d9acdd8a2f0e0adeca28bfad36882e0fe9
2016-05-21 21:59:59 +02:00
Sethakill
179e2f892d Convert Special:NewFiles to use OOUI.
Other changes:
* moved form from pager
* added FormOptions

Bug: T135680
Change-Id: I1d9c0a761fd3d71fe58c2621c9766c2c6dd39dcb
2016-05-21 20:39:18 +02:00
Amire80
a2f838d9c1 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
2016-05-21 13:26:00 +03:00
jenkins-bot
887ba639a2 Merge "Revert "Enable AuthManager by default"" 2016-05-20 23:08:21 +00:00
Chad
81132bf3cc Revert "Enable AuthManager by default"
Breaking some extensions at the moment in unit testing,
needs more cleanup first

This reverts commit 485e0548e9.

Change-Id: Icdde13df71204ff99b8ef60bd9ebf356c40615b9
2016-05-20 22:56:20 +00:00
Translation updater bot
81d862e34d Localisation updates from https://translatewiki.net.
Change-Id: Ia6f9b128f9747919c7263200b639ef8207079f3f
2016-05-20 21:56:30 +02:00