5 years agoQA: Upgrade to mediawiki_selenium 1.6.5
Dan Duvall [Mon, 1 Feb 2016 23:30:44 +0000 (15:30 -0800)]
QA: Upgrade to mediawiki_selenium 1.6.5

Bug: T114241
Change-Id: I2996611d51b5d08c67f7a60d05003db97dffc0b7

5 years agoMerge "New hook for filters on Special:Contributions form"
jenkins-bot [Mon, 1 Feb 2016 22:47:40 +0000 (22:47 +0000)]
Merge "New hook for filters on Special:Contributions form"

5 years agoMerge "Add phpdoc for some ApiQueryInfo properties"
jenkins-bot [Mon, 1 Feb 2016 22:40:29 +0000 (22:40 +0000)]
Merge "Add phpdoc for some ApiQueryInfo properties"

5 years agoRemove SessionManager, temporarily
Brad Jorsch [Mon, 1 Feb 2016 17:28:29 +0000 (12:28 -0500)]
Remove SessionManager, temporarily

The plan here is to take it out of 1.27.0-wmf.12 and put it back in

Since BotPasswords depends on SessionManager, that's getting temporarily
removed too.

This reverts the following commits:
6acd424e0dbc322e8b9a141bd2625453c1b9b6f1 SessionManager: Notify AuthPlugin before calling hooks
4d1ad32d8acbd443346253d2f6a95024c833295c Close a loophole in CookieSessionProvider
fcdd643a46d87b677f6cdcc3ba9440e1472d8df7 SessionManager: Don't save non-persisted sessions to backend storage
058aec4c76129b7ee8541692a8a48f8046e15bb6 MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php
b5c0c03bb708f8dad6e404969df8addc123984db SessionManager: Save user name to metadata even if the user doesn't exist locally
13f2f09a193215aa7a061d10a1955e172d06fa0a SECURITY: Fix User::setToken() call on User::newSystemUser
305bc75b27903237a9683ec1f329bcbec0ecd266 SessionManager: Don't generate user tokens when checking the tokens
7c4bd85d2152fd9fa975ea0fb5ffb1a0b804f99b RequestContext::exportSession() should only export persisted session IDs
296ccfd4a9a6ad3ae412db7e2408c923aaa61f64 SessionManager: Save 'persisted' flag in session metadata
94ba53f67731b0553a6178841d9506e384f74496 Move CSRF token handling into MediaWiki\Session\Session
46a565d6b00174e631d2022b47677e1a78e73897 Avoid false "added in both Session and $_SESSION" when value is null
c00d0b5d94c946b8883dd7062bf7160a199aa5c2 Log backtrace for "User::loadFromSession called before the end of Setup.php"
4eeff5b559e2ae7b8fa1f45572968ba28573a421 Use $wgSecureCookie to decide whether to actually mark secure cookies as 'secure'
7491b52f700e220814a8190781fd794b4dd88a20 Call session_cache_limiter() before starting a session
2c34aeea72471f9a598e67bdbf34bc5f9fb3f0c5 SessionManager: Abstract forceHTTPS cookie setting
9aa53627a53aabec0273cecf45a86e77927ef406 Ignore auth cookies with value 'deleted'
43f904b51a746d7f71ea2ab9951c5c98d269765b SessionManager: Kill getPersistedSessionId()
50c52563528ba3d765c3762211f98d6f3c0e39fd SessionManager: Add SessionBackend::setProviderMetadata()
f640d403154bc0a2b4f6d399582797a9e3bc6fcb SessionManager: Notify AuthPlugin when auto-creating accounts
70b05d1ac1e859bac2185b246e9b93ec9051e4d8 Add checks of $wgEnableBotPasswords in more places
bfed32eb78b6c720b16bc7ed60153fd2fe257a9e Do not raise a PHP warning when session write fails
722a7331ad8d98228511f8da38adc7a3c64dd617 Only check LoggedOut timestamp on the user loaded from session
4f5057b84b36eccd16627a6b29831dfdb4483b02 SessionManager: Change behavior of getSessionById()
66e82e614e157e39b03d813e71ddf23f53cf640b Fix typo in [[MediaWiki:Botpasswords-editexisting/en]]
f9fd9516d922d36291037baca7205a2b0ac9f15f Add "bot passwords"
d7716f1df0b692902571bf415a0984071e3e9a60 Add missing argument for wfDebugLog
a73c5b7395a07d490f7052fd3b2491ebd656b190 Add SessionManager

Change-Id: I2389a8133e25ab929e9f27f41fa9a05df8147a50

5 years agoMerge "Remove use of explodeMarkup"
jenkins-bot [Mon, 1 Feb 2016 21:31:27 +0000 (21:31 +0000)]
Merge "Remove use of explodeMarkup"

5 years agoMerge "Revert "Remove unused functions from unroll of Article::__call""
jenkins-bot [Mon, 1 Feb 2016 20:26:38 +0000 (20:26 +0000)]
Merge "Revert "Remove unused functions from unroll of Article::__call""

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 1 Feb 2016 20:20:52 +0000 (21:20 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I5d76f70102160fdeb8fe596f0f31b04efdcb56d7

5 years agoRevert "Remove unused functions from unroll of Article::__call"
Alex Monk [Mon, 1 Feb 2016 20:05:38 +0000 (20:05 +0000)]
Revert "Remove unused functions from unroll of Article::__call"

This reverts commit 0204a28443606a2b3026d403c625f3a089841430.

Change-Id: Ia058c91f808eedae28946b9561c826fbf09b386e

5 years agoMerge "Fix typo in mw.widgets.CategorySelector.js"
jenkins-bot [Mon, 1 Feb 2016 17:16:28 +0000 (17:16 +0000)]
Merge "Fix typo in mw.widgets.CategorySelector.js"

5 years agoFix typo in mw.widgets.CategorySelector.js
Glaisher [Mon, 1 Feb 2016 16:41:40 +0000 (21:41 +0500)]
Fix typo in mw.widgets.CategorySelector.js

Change-Id: I65aef06fbabab8b3d4d8c6b72847fecb0637f352

5 years agoMerge "Use autoloader for PHP data files instead of include/require"
jenkins-bot [Mon, 1 Feb 2016 15:11:54 +0000 (15:11 +0000)]
Merge "Use autoloader for PHP data files instead of include/require"

5 years agoMerge "Remove unused functions from unroll of Article::__call"
jenkins-bot [Mon, 1 Feb 2016 14:09:36 +0000 (14:09 +0000)]
Merge "Remove unused functions from unroll of Article::__call"

5 years agoSessionManager: Notify AuthPlugin before calling hooks
Brad Jorsch [Sun, 31 Jan 2016 20:48:23 +0000 (15:48 -0500)]
SessionManager: Notify AuthPlugin before calling hooks

This avoids a race in CentralAuth:
* The user doesn't exist locally, so CA wants to create it
* Auto-creation adds the user to the database
* A hook function tries to access the session; now the user does exist
  locally but isn't yet attached, so CA rejects the session.

Bug: T125283
Change-Id: I6024885e3cf9c85c527fc160577f66ff97451c98

5 years agoAdd myself to CREDITS
Florian [Mon, 1 Feb 2016 00:02:54 +0000 (01:02 +0100)]
Add myself to CREDITS

Change-Id: Ib16b6e91b0ce25bef6b747c90955cf840c63dabf

5 years agoMerge "ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load"
jenkins-bot [Sun, 31 Jan 2016 22:52:52 +0000 (22:52 +0000)]
Merge "ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load"

5 years agoResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load
Bartosz Dziewoński [Sun, 31 Jan 2016 22:23:27 +0000 (23:23 +0100)]
ResourceLoaderImage: Use DomDocument::loadXml rather than DomDocument::load

Some users are reporting that DomDocument::load can't read the files
on their setups, while they can be read with file_get_contents. So use
that and pass the string to DomDocument::loadXml. The advantage of
DomDocument::load is supposed to be in handling large files, and the
icons here are supposed to be small.

Bug: T107198
Change-Id: I8e4dc4642f9d0c5f01ec5e4061e83bf09d0a4900

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 31 Jan 2016 20:20:37 +0000 (21:20 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I3e45e4442bad5ddf8bf91b9cf4d2f8c66b143929

5 years agoMerge "Correct messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-targe...
jenkins-bot [Sun, 31 Jan 2016 18:43:52 +0000 (18:43 +0000)]
Merge "Correct messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-target-svg'"

5 years agoCorrect messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-target-svg'
Bartosz Dziewoński [Sun, 31 Jan 2016 18:10:09 +0000 (19:10 +0100)]
Correct messages 'uploaded-href-attribute-svg' and 'uploaded-href-unsafe-target-svg'

Whoops, 'uploaded-href-attribute-svg' was actually telling the user
almost the exact opposite of the truth. I'm also removing all the
translations for it, as they're all wrong.

Change-Id: I56b62c0127cb87707256c8e45d49ce7764f49e31

5 years agoMerge "wfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't...
jenkins-bot [Sun, 31 Jan 2016 11:39:50 +0000 (11:39 +0000)]
Merge "wfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't needed"

5 years agoMerge "Give TestCase::checkHasDiff3 a better name"
jenkins-bot [Sun, 31 Jan 2016 11:39:46 +0000 (11:39 +0000)]
Merge "Give TestCase::checkHasDiff3 a better name"

5 years agoMerge "HTMLUserTextField: Enable suggestions for non-OOUI mode"
jenkins-bot [Sun, 31 Jan 2016 11:39:42 +0000 (11:39 +0000)]
Merge "HTMLUserTextField: Enable suggestions for non-OOUI mode"

5 years agoMerge "SpecialMovepage: Use hidden form fields to set hidden data, not the submit...
jenkins-bot [Sun, 31 Jan 2016 11:36:10 +0000 (11:36 +0000)]
Merge "SpecialMovepage: Use hidden form fields to set hidden data, not the submit button"

5 years agoAdd missing ResetUserEmail class to autoload.php
Florian [Sat, 30 Jan 2016 21:45:35 +0000 (22:45 +0100)]
Add missing ResetUserEmail class to autoload.php

The test in I3a426b92892f4c00cab33a13f6a717751120367c would prevent
the need of this commit :P

Follow up: I2b875326a0eb1e6d1f4bc758b8ac97b8f9324c4e

Change-Id: Id5efc5a5b43a1795c133f64025ea04f3e2d159cb

5 years agoClose a loophole in CookieSessionProvider
Brad Jorsch [Sat, 30 Jan 2016 15:54:24 +0000 (10:54 -0500)]
Close a loophole in CookieSessionProvider

There's a crazy-small chance that someone could have a logged-out
session (e.g. by logging out or visiting a page that creates a session
despite being logged out), then the session expires, then someone else
logs in and gets the same session ID (which is about a 1 in a
quindecillion chance), then the first person comes in and picks up the
second person's session.

To avoid that, if there's no UserID cookie set (or the cookie value is
0) then indicate that the SessionInfo is for a logged-out user.

No idea if this is actually what happened in T125283, but it's worth
fixing anyway.

Bug: T125283
Change-Id: I44096c69aa7bd285e4e2472959e8d892200c5f2c

5 years agoHTMLUserTextField: Enable suggestions for non-OOUI mode
Florian [Thu, 29 Oct 2015 18:00:59 +0000 (19:00 +0100)]
HTMLUserTextField: Enable suggestions for non-OOUI mode

Bug: T117067
Change-Id: I03eabf6ed5d5a36534a5eec76c05d0a353ebf6ff

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 30 Jan 2016 21:33:26 +0000 (22:33 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I2610945396e52544782c86e00c34bf64abf2a129

5 years agowfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't needed
Florian [Wed, 13 Jan 2016 17:55:08 +0000 (18:55 +0100)]
wfMsgReplaceArgs: Don't use count(), if the actual amount of entries isn't needed

The only use of the return value of count() is, to check, if the array is empty or
not. This can be done in an easier way and a bit more performant, especially for
large arrays.

Change-Id: If119ead9230ba1783b8c853c18c379f174910e51

5 years agoRemove unused functions from unroll of Article::__call
umherirrender [Sat, 30 Jan 2016 12:44:01 +0000 (13:44 +0100)]
Remove unused functions from unroll of Article::__call

With I779aa1c017abc9a17047fd5335f2d082148daa6f all public functions from
WikiPage were copied as delegator into Article.

Now remove the unused functions and add a release notes

Change-Id: I9cc79acedecb003048e1add568e8bba96ddbb41a

5 years agoStyle and commenting tweaks to CategoryMembershipChangeJob
Aaron Schulz [Sat, 30 Jan 2016 18:19:36 +0000 (10:19 -0800)]
Style and commenting tweaks to CategoryMembershipChangeJob

Also renamed safeWaitForPos() => safeWaitForMasterPos()

Change-Id: Ic89e2a0b17cd6e6ef09cf703bbbcea1988a5bde9

5 years agoMerge "Do not auto-reconnect to DBs if named locks where lost"
jenkins-bot [Sat, 30 Jan 2016 18:07:35 +0000 (18:07 +0000)]
Merge "Do not auto-reconnect to DBs if named locks where lost"

5 years agoMerge "Use slave for selects in CategoryMembershipJob"
jenkins-bot [Sat, 30 Jan 2016 17:51:10 +0000 (17:51 +0000)]
Merge "Use slave for selects in CategoryMembershipJob"

5 years agoUse slave for selects in CategoryMembershipJob
addshore [Fri, 29 Jan 2016 10:10:52 +0000 (11:10 +0100)]
Use slave for selects in CategoryMembershipJob

This patch switches to using a slave but imediatly
waits for the slave to catch up with master
(so as not to miss things).

This may result in more delay between an edit and
category changes being inserted.

It may be possible to instead wait for the timestamp
that is passed in $this->params['revTimestamp']
which could result in slightly less delay.

I can't see any uses of waitForReplication in quite
this way but see no imediate reason this would not work.

Bug: T125147
Change-Id: Ia0aa722c97f41a3959bcd3cb4210b39db0c3bc45

5 years agoDo not auto-reconnect to DBs if named locks where lost
Aaron Schulz [Sat, 30 Jan 2016 17:17:17 +0000 (09:17 -0800)]
Do not auto-reconnect to DBs if named locks where lost

Otherwise, transactions might be committed without cooperative
locks that were supposed to be present. This is similar to the
logic of not auto-reconnecting if a transaction was started to
avoid committing incomplete changes.

Change-Id: Ia7bc6b188bb5ee53a5bf7c5a30718bc7c4dd0ba9

5 years agoMake sure getScopedLockAndFlush() commits before unlocking
Aaron Schulz [Sat, 30 Jan 2016 16:52:06 +0000 (08:52 -0800)]
Make sure getScopedLockAndFlush() commits before unlocking

This is necessary for callers to see changes from prior callers

Change-Id: I5e05215541e641b5b5a4bc55c91d6ec8ef774ca1

5 years agoUse addDescription in resetUserEmail maint script
addshore [Sat, 30 Jan 2016 13:55:27 +0000 (14:55 +0100)]
Use addDescription in resetUserEmail maint script

Change-Id: Ib1eb8e3adc8deed0d09c1f655218144b2305d137

5 years agoAdd script to reset user emails
Max Semenik [Mon, 23 Nov 2015 23:32:33 +0000 (15:32 -0800)]
Add script to reset user emails

Current way to do it, via eval.php, is slightly scary.

Change-Id: I2b875326a0eb1e6d1f4bc758b8ac97b8f9324c4e

5 years agoMerge "Use addDescription() instead of accessing mDescription directly"
jenkins-bot [Sat, 30 Jan 2016 13:53:11 +0000 (13:53 +0000)]
Merge "Use addDescription() instead of accessing mDescription directly"

5 years agoMerge "Unroll Article::__call"
jenkins-bot [Sat, 30 Jan 2016 13:53:07 +0000 (13:53 +0000)]
Merge "Unroll Article::__call"

5 years agoMerge "Improve safeGetLag() return docs"
jenkins-bot [Sat, 30 Jan 2016 13:35:39 +0000 (13:35 +0000)]
Merge "Improve safeGetLag() return docs"

5 years agoMerge "Code style cleanups to notifyOnPageChange()"
jenkins-bot [Sat, 30 Jan 2016 13:35:34 +0000 (13:35 +0000)]
Merge "Code style cleanups to notifyOnPageChange()"

5 years agoMerge "Fix doc of LogFormatter::newFromRow"
jenkins-bot [Sat, 30 Jan 2016 12:24:49 +0000 (12:24 +0000)]
Merge "Fix doc of LogFormatter::newFromRow"

5 years agoUnroll Article::__call
umherirrender [Sat, 16 Jan 2016 16:44:37 +0000 (17:44 +0100)]
Unroll Article::__call

Add all public function from WikiPage to Article and replace the magic

__call has the problem, that new functions to WikiPage will also be
available through Article.
It also makes deprecating of some functions harder. Having each function
as an own function will allow to add deprecated notice to just some and
maybe delete some functions earlier than others.

Also some static code analyzer can benefit from separately functions.

Change-Id: I779aa1c017abc9a17047fd5335f2d082148daa6f

5 years agoKill vestiges of SVN times
Max Semenik [Sat, 30 Jan 2016 01:02:36 +0000 (17:02 -0800)]
Kill vestiges of SVN times

Change-Id: Ib80c71ea93479eb326ac5afea295d4608f92babe

5 years agoUse addDescription() instead of accessing mDescription directly
Max Semenik [Sat, 30 Jan 2016 02:48:47 +0000 (18:48 -0800)]
Use addDescription() instead of accessing mDescription directly

Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103

5 years agoMerge "Remove ApiBase::getVersion()"
jenkins-bot [Sat, 30 Jan 2016 02:38:24 +0000 (02:38 +0000)]
Merge "Remove ApiBase::getVersion()"

5 years agoUse autoloader for PHP data files instead of include/require
Tim Starling [Fri, 29 Jan 2016 05:19:58 +0000 (16:19 +1100)]
Use autoloader for PHP data files instead of include/require

Move ZhConversion.php and Names.php to languages/data and make them both
expose their data as static class variables instead of in the local
scope. This means that the autoloader can be used to load the data,
which is efficient and secure. This also makes additional request-local
caching of the arrays unnecessary.

Change-Id: Iafb96ac4165d0965fcb9a69f1d0a91139ea9790c

5 years agoSECURITY: Fix User::setToken() call on User::newSystemUser
Gergő Tisza [Thu, 28 Jan 2016 23:10:00 +0000 (17:10 -0600)]
SECURITY: Fix User::setToken() call on User::newSystemUser

This was supposed to reset the user token but did set it to '1'
because User::setToken accepts bool/string but only treats true
as bool.

Bug: T125161
Change-Id: Ia4196eba92cd4d170a3023db0f540a2972ffad4f

5 years agoRemove ApiBase::getVersion()
Max Semenik [Sat, 30 Jan 2016 01:16:31 +0000 (17:16 -0800)]
Remove ApiBase::getVersion()

Deprecated in 1.21, removal does not break old extensions still overriding

Change-Id: I24028eab8800373410c6b72a74715f3525c2f7ae

5 years agoSessionManager: Don't save non-persisted sessions to backend storage
Brad Jorsch [Fri, 29 Jan 2016 23:02:11 +0000 (18:02 -0500)]
SessionManager: Don't save non-persisted sessions to backend storage

This introduces an in-process cache (using a HashBagOStuff) for session
data, and only saves to the external cache when the session is

Bug: T125267
Change-Id: Ie161e0f7522cd68515b060ad8cf8c151b7198b0b

5 years agoCode style cleanups to notifyOnPageChange()
Aaron Schulz [Sat, 30 Jan 2016 00:03:29 +0000 (16:03 -0800)]
Code style cleanups to notifyOnPageChange()

Change-Id: I08593be2eba6417cdfae31b1aa1021da7db00c74

5 years agoImprove safeGetLag() return docs
Aaron Schulz [Fri, 29 Jan 2016 23:09:59 +0000 (15:09 -0800)]
Improve safeGetLag() return docs

Change-Id: I7b2d0d96901412abe8bdf9abee39e6d545c94644

5 years agoFix IDEA error in safeWaitForPos()
Aaron Schulz [Fri, 29 Jan 2016 22:47:38 +0000 (14:47 -0800)]
Fix IDEA error in safeWaitForPos()

Change-Id: Iecb023925177be05282f67e48056aeb8f2a9703c

5 years agoMerge "Add LoadBalancer::safeWaitForPos()"
jenkins-bot [Fri, 29 Jan 2016 22:19:55 +0000 (22:19 +0000)]
Merge "Add LoadBalancer::safeWaitForPos()"

5 years agoMerge "MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup...
jenkins-bot [Fri, 29 Jan 2016 21:55:54 +0000 (21:55 +0000)]
Merge "MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 29 Jan 2016 21:16:33 +0000 (22:16 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ic30a1de26fc701c3147e1c324152c35d03fb3645

5 years agoAdd LoadBalancer::safeWaitForPos()
Aaron Schulz [Fri, 29 Jan 2016 21:00:08 +0000 (13:00 -0800)]
Add LoadBalancer::safeWaitForPos()

This is useful for waiting on a specific slave handle to
reach a given master position.

Change-Id: Ia4569c4fc82c25eb4089cf7198f01e349636e2c7

5 years agoMerge "Add IDatabase::getScopedLockAndFlush() method"
jenkins-bot [Fri, 29 Jan 2016 20:54:10 +0000 (20:54 +0000)]
Merge "Add IDatabase::getScopedLockAndFlush() method"

5 years agoMerge "Remove $wgEnotifUseJobQ"
jenkins-bot [Fri, 29 Jan 2016 20:43:10 +0000 (20:43 +0000)]
Merge "Remove $wgEnotifUseJobQ"

5 years agoMerge "Remove $wgDataCenterId/$wgDataCenterRoles"
jenkins-bot [Fri, 29 Jan 2016 20:43:03 +0000 (20:43 +0000)]
Merge "Remove $wgDataCenterId/$wgDataCenterRoles"

5 years agoAdd IDatabase::getScopedLockAndFlush() method
Aaron Schulz [Sun, 17 Jan 2016 10:40:53 +0000 (02:40 -0800)]
Add IDatabase::getScopedLockAndFlush() method

This method is less manual and avoids the usual pitfalls of
not unlocking for a return statement or not flushing out any
prior transaction.

Change-Id: Ib1681244767de860105a68210e181e2f024ee525

5 years agoRemove $wgEnotifUseJobQ
Aaron Schulz [Fri, 22 Jan 2016 04:14:44 +0000 (20:14 -0800)]
Remove $wgEnotifUseJobQ

Always treat this as on and simplify the code.
This will also make it easier to move updateWatchlistTimestamp() into
the EnotifNotifyJob class to avoid query timeouts.

Change-Id: I8ceaa42cdcfe3ad00a26368be6a73052be329045

5 years agoMerge "Use InvalidArgumentException in ActivityUpdateJob"
jenkins-bot [Fri, 29 Jan 2016 20:21:37 +0000 (20:21 +0000)]
Merge "Use InvalidArgumentException in ActivityUpdateJob"

5 years agoRemove $wgDataCenterId/$wgDataCenterRoles
Aaron Schulz [Fri, 29 Jan 2016 20:09:56 +0000 (12:09 -0800)]
Remove $wgDataCenterId/$wgDataCenterRoles

These ended up not getting used after some patch changes

Change-Id: I7c56d58972d1efcca6a249b7fb4d422a4006da88

5 years agoMerge "Make WatchedItem members private"
jenkins-bot [Fri, 29 Jan 2016 19:59:56 +0000 (19:59 +0000)]
Merge "Make WatchedItem members private"

5 years agoUse InvalidArgumentException in ActivityUpdateJob
Aaron Schulz [Fri, 29 Jan 2016 19:56:04 +0000 (11:56 -0800)]
Use InvalidArgumentException in ActivityUpdateJob

Change-Id: Ib73c02868327d5e8f286bce79cdf44ebb1f47ff3

5 years agoMake WatchedItem members private
addshore [Fri, 29 Jan 2016 19:39:23 +0000 (20:39 +0100)]
Make WatchedItem members private

These are only used in this class

Change-Id: I492e7f5b0611f8928b352af983f18f5184bc54bf

5 years agoRemove WatchedItem::IMMEDIATE and DEFERRED
addshore [Fri, 29 Jan 2016 19:10:26 +0000 (20:10 +0100)]
Remove WatchedItem::IMMEDIATE and DEFERRED

It looks like this used to actually be used
since Ie60e20162fd833e64d81763a6aa1dc3faf2162f3
but since the global wgActivityUpdatesUseJobQueue
seems to have been removed from the code.

Thus this stuff is doing nothing and
things are always DEFERRED.

Change-Id: I08cb6051f52e0f0402542d8326f03f115bb00943

5 years agoMessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php
Brad Jorsch [Fri, 29 Jan 2016 19:30:25 +0000 (14:30 -0500)]
MessageCache: Don't get a ParserOptions for $wgUser before the end of Setup.php

Until Setup.php completes, we can't access the "current" user and trying
to do so logs a warning. So don't try.

Bug: T124367
Change-Id: If31230407829c04f34d9cfefcbb97edacb949b6d

5 years agoMerge "Hide category changes if feature is disabled"
jenkins-bot [Fri, 29 Jan 2016 19:30:10 +0000 (19:30 +0000)]
Merge "Hide category changes if feature is disabled"

5 years agoMerge "KafkaHandler: allow customizing timeouts"
jenkins-bot [Fri, 29 Jan 2016 19:16:03 +0000 (19:16 +0000)]
Merge "KafkaHandler: allow customizing timeouts"

5 years agoRemove use of explodeMarkup
Arlo Breault [Thu, 28 Jan 2016 04:21:35 +0000 (20:21 -0800)]
Remove use of explodeMarkup

 * At that point, element attributes are already escaped so it serves no
   purpose. Before `doTableStuff` is called, `Sanitizer::removeHTMLtags`
   has been invoked which calls `Sanitizer::fixTagAttributes` which
   calls `Sanitizer::safeEncodeTagAttributes` and finally gets down to
   `Sanitizer::safeEncodeAttribute`, with the goal of "extra armoring
   against further wiki processing."

Change-Id: Ieeb9b21148c2909eb839d13195d7d10012b48e3b

5 years agoMerge "Move MaxUserDBWriteDuration logic to LBFactory"
jenkins-bot [Fri, 29 Jan 2016 19:05:16 +0000 (19:05 +0000)]
Merge "Move MaxUserDBWriteDuration logic to LBFactory"

5 years agoFix doc of LogFormatter::newFromRow
addshore [Fri, 29 Jan 2016 14:41:32 +0000 (15:41 +0100)]
Fix doc of LogFormatter::newFromRow

DatabaseLogEntry::newFromRow can take both
objects and arrays (arrays are cast to objects).

An array is passed into this method in the
CheckUser extension.

Fixing this phpdoc will mean static analysis
tools will no longer detect that as an error

Change-Id: I84f35c21f8b4e3be0f5b5bd2051f566bda6544fc

5 years agoHide category changes if feature is disabled
addshore [Fri, 29 Jan 2016 11:42:04 +0000 (12:42 +0100)]
Hide category changes if feature is disabled

Recently when RCWatchCategoryMembership was set
to false for many wikis suddenly all of the
category changes appeared in watchlists and in
recent changes.

This patch will avoid this and would instead
continue following the users settings

Change-Id: Id5468e8ef0ff430f03bacae708267a6ee6c84e48

5 years agoMerge "Fix a spelling mistake in a comment"
jenkins-bot [Fri, 29 Jan 2016 07:57:18 +0000 (07:57 +0000)]
Merge "Fix a spelling mistake in a comment"

5 years agoFix a spelling mistake in a comment
Arlo Breault [Thu, 28 Jan 2016 23:23:38 +0000 (15:23 -0800)]
Fix a spelling mistake in a comment

Change-Id: Idf3f9b7778cec846578b0c5242ef8530dc8f32b3

5 years agoMerge "Log user-agents that are using HTTP when HTTPS is preferred"
jenkins-bot [Fri, 29 Jan 2016 04:13:46 +0000 (04:13 +0000)]
Merge "Log user-agents that are using HTTP when HTTPS is preferred"

5 years agoLog user-agents that are using HTTP when HTTPS is preferred
Bryan Davis [Thu, 28 Jan 2016 00:53:54 +0000 (17:53 -0700)]
Log user-agents that are using HTTP when HTTPS is preferred

Log a feature usage message and add a warning to the response when an
API request is made over unencrypted HTTP and the wiki or user has asked
that HTTPS be used by default.

Bug: T105794
Change-Id: I339bfa96614c6318db303bb22a8f86bd0336ddbe

5 years agoKafkaHandler: allow customizing timeouts
Max Semenik [Fri, 29 Jan 2016 00:23:22 +0000 (16:23 -0800)]
KafkaHandler: allow customizing timeouts

Bug: T125084
Change-Id: I8f01fa61d916aeaa831a84e12b6fae08d04ca046

5 years agoMove MaxUserDBWriteDuration logic to LBFactory
Aaron Schulz [Sun, 27 Dec 2015 23:41:14 +0000 (15:41 -0800)]
Move MaxUserDBWriteDuration logic to LBFactory

Change-Id: If7231af24f10ae29b7137f147abb60a351c9127f

5 years agoMerge "Title::newFromText: Cast integers to strings"
jenkins-bot [Fri, 29 Jan 2016 00:55:37 +0000 (00:55 +0000)]
Merge "Title::newFromText: Cast integers to strings"

5 years agoTitle::newFromText: Cast integers to strings
This, that and the other [Thu, 28 Jan 2016 23:52:37 +0000 (10:52 +1100)]
Title::newFromText: Cast integers to strings

This is the cause of the T76305 debug log entries relating to SpecialExport
and Echo.

Bug: T76305
Bug: T116034
Change-Id: I64d629d31be79c4b4702a4298bce68fd544df6e8

5 years agoMerge "mw.loader: Minor documentation and test improvements"
jenkins-bot [Thu, 28 Jan 2016 23:22:23 +0000 (23:22 +0000)]
Merge "mw.loader: Minor documentation and test improvements"

5 years agoMerge "Remove require_once for language classes"
jenkins-bot [Thu, 28 Jan 2016 23:16:37 +0000 (23:16 +0000)]
Merge "Remove require_once for language classes"

5 years agoMerge "Add ParserOutputStashForEdit hook for extension cache warming"
jenkins-bot [Thu, 28 Jan 2016 23:13:06 +0000 (23:13 +0000)]
Merge "Add ParserOutputStashForEdit hook for extension cache warming"

5 years agoRemove require_once for language classes
Tim Starling [Thu, 28 Jan 2016 22:12:05 +0000 (09:12 +1100)]
Remove require_once for language classes

Remove require_once for LanguageConverter and base classes. These
are in the autoloader now, so an explicit require is no longer

Change-Id: Ie34ffc58fd9ec89fb57cf077dd5ac1746c35c48e

5 years agomw.loader: Minor documentation and test improvements
Timo Tijhof [Thu, 28 Jan 2016 22:23:36 +0000 (23:23 +0100)]
mw.loader: Minor documentation and test improvements

Update outdated mw.loader.implement documentation

* Not all arguments are required.
* Even 'script' is no longer required. Defaults to 'null' in the registry.
  And supported by execute().
* Add a test for implement() with a name only and no resources.

Bug: T112455
Change-Id: I5ebd8542ae1a4b2f14ffaff560b98b4c1c2adb23

5 years agoSessionManager: Save user name to metadata even if the user doesn't exist locally
Brad Jorsch [Thu, 28 Jan 2016 21:19:37 +0000 (16:19 -0500)]
SessionManager: Save user name to metadata even if the user doesn't exist locally

Bug: T125133
Change-Id: I12ff84db614f0d5839457aa92be58c62b3a4e8fd

5 years agoMerge "User: Fix loading of user_token"
jenkins-bot [Thu, 28 Jan 2016 20:15:15 +0000 (20:15 +0000)]
Merge "User: Fix loading of user_token"

5 years agoMerge "SessionManager: Don't generate user tokens when checking the tokens"
jenkins-bot [Thu, 28 Jan 2016 20:03:21 +0000 (20:03 +0000)]
Merge "SessionManager: Don't generate user tokens when checking the tokens"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 28 Jan 2016 19:54:24 +0000 (20:54 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ifd89bebff1d57bcdc57b39ae6a05ea9f5acb115c

5 years agoUser: Fix loading of user_token
Brad Jorsch [Thu, 28 Jan 2016 18:46:22 +0000 (13:46 -0500)]
User: Fix loading of user_token

Similar to T124414, we should always load user_token from the row even
if user_email is unset.

Also, I notice that maintenance/tables.sql defines the column as
"binary(32)", which is going to append ASCII NUL bytes to the default
empty-string. And before that it was "char(32)", which will append
spaces. So trim both of those off when reading the field so the
following check for === '' actually works.

The latter doesn't seem to affect *most* WMF wikis, since they have the
column defined as "varbinary(32)" for some reason. But there are a few
with "binary(32)", I have no idea why.

Change-Id: I50a813bb530639275628d9560c79a773676aa36d

5 years agoSessionManager: Don't generate user tokens when checking the tokens
Brad Jorsch [Thu, 28 Jan 2016 18:27:01 +0000 (13:27 -0500)]
SessionManager: Don't generate user tokens when checking the tokens

Looking at the pre-SessionManager token checking, it's apparently valid
to log in despite user_token being empty. The stored token just gets
compared against the empty string that got returned previously.

This also cleans up some checks that assumed $user->getToken() didn't
automatically create the token if one wasn't already set.

Bug: T125114
Change-Id: Ia3d2382e96e2a0146f33fb7193a2e00ea72e51a0

5 years agoGive TestCase::checkHasDiff3 a better name
addshore [Wed, 27 Jan 2016 18:56:09 +0000 (19:56 +0100)]
Give TestCase::checkHasDiff3 a better name

This method actually marks the test it is called
from as skipped if Diff3 is not confugured.

The new name "markTestSkippedIfNoDiff3" better
reflects that.

Change-Id: I1dffeba0aceb312b3a82216f0b55227e24bc2e34

5 years agoMerge "Add support for image interlacing of Bitmap type images"
jenkins-bot [Thu, 28 Jan 2016 08:11:08 +0000 (08:11 +0000)]
Merge "Add support for image interlacing of Bitmap type images"

5 years agoMerge "Move CSRF token handling into MediaWiki\Session\Session"
jenkins-bot [Thu, 28 Jan 2016 07:11:27 +0000 (07:11 +0000)]
Merge "Move CSRF token handling into MediaWiki\Session\Session"

5 years agoMerge "TagLogFormatter: For log entries changing both revid and logid tags, prefer...
jenkins-bot [Thu, 28 Jan 2016 06:00:32 +0000 (06:00 +0000)]
Merge "TagLogFormatter: For log entries changing both revid and logid tags, prefer revid"

5 years agoMigrate callers to waitForReplication()
Aaron Schulz [Wed, 20 Jan 2016 17:23:46 +0000 (09:23 -0800)]
Migrate callers to waitForReplication()

Change-Id: I7b2b13b9315891561d2d8cc04a12ecad2dc73d70

5 years agoMerge "Cleanup setFileDependencies() docs"
jenkins-bot [Thu, 28 Jan 2016 01:29:59 +0000 (01:29 +0000)]
Merge "Cleanup setFileDependencies() docs"