lhc/web/wiklou.git
7 years agoAPI: Add hooks for ApiQueryBase's query and row-processing
Brad Jorsch [Wed, 14 Sep 2016 18:22:35 +0000 (14:22 -0400)]
API: Add hooks for ApiQueryBase's query and row-processing

This will allow extensions to inject into the query to implement
"xxshow" parameters, and to add additional properties to the output
data for "xxprop" parameters.

Also, call these new hooks from ApiQueryRevisions, ApiQueryAllRevisions,
ApiQueryUserContributions, and ApiQueryRecentChanges since I701e8e19 is
going to be wanting them.

Bug: T143614
Bug: T143616
Change-Id: Id6b42c7f2eb53a6f659d0d61383287f41d96ca00

7 years agoMinor LoadBalancer cleanups
Aaron Schulz [Thu, 6 Oct 2016 16:52:17 +0000 (09:52 -0700)]
Minor LoadBalancer cleanups

* Close the master connection in safeWaitForMasterPos() if created.
* Remove unnecessary reuseConnection() calls.
* Add DOMAIN_ANY constant for readability.

Change-Id: I9e64a7405e0eedc50e7b93d05d65cf00d5544a77

7 years agoReplace false for null in sourceFile() call
Reedy [Fri, 7 Oct 2016 00:12:31 +0000 (01:12 +0100)]
Replace false for null in sourceFile() call

Bug: T147609
Change-Id: I79f556efbe9e75919c4d59beca621d7f8ac54bb8

7 years agoDeprecation of 2 more ContentHandler hooks
Reedy [Thu, 6 Oct 2016 23:27:34 +0000 (00:27 +0100)]
Deprecation of 2 more ContentHandler hooks

ArticleInsertComplete, ArticleSaveComplete

Bug: T145728
Bug: T147388
Bug: T147390
Change-Id: Ib861d3ee72bdaecfd91b7e719bc8054789ccd489

7 years agoMerge "Make DatabaseMysqlBase use connLogger for connection errors"
jenkins-bot [Thu, 6 Oct 2016 23:04:44 +0000 (23:04 +0000)]
Merge "Make DatabaseMysqlBase use connLogger for connection errors"

7 years agoMerge "Make more ContentHandler replaced hooks emit deprecation warnings"
jenkins-bot [Thu, 6 Oct 2016 22:58:54 +0000 (22:58 +0000)]
Merge "Make more ContentHandler replaced hooks emit deprecation warnings"

7 years agoMerge "Make ShowRawCssJs hook emit deprecated warnings"
jenkins-bot [Thu, 6 Oct 2016 22:57:40 +0000 (22:57 +0000)]
Merge "Make ShowRawCssJs hook emit deprecated warnings"

7 years agoMake more ContentHandler replaced hooks emit deprecation warnings
Reedy [Thu, 6 Oct 2016 13:44:00 +0000 (14:44 +0100)]
Make more ContentHandler replaced hooks emit deprecation warnings

ArticleAfterFetchContent, ArticleSave

Bug: T145728
Bug: T147387
Bug: T147389
Change-Id: I58a0c46b95b8ef02ff55851cfdec7e9d6eeed83c

7 years agoMerge "Add 'pmid' to the default interwiki list, and update 'rfc'"
jenkins-bot [Thu, 6 Oct 2016 22:40:02 +0000 (22:40 +0000)]
Merge "Add 'pmid' to the default interwiki list, and update 'rfc'"

7 years agoAdd 'pmid' to the default interwiki list, and update 'rfc'
Kunal Mehta [Thu, 6 Oct 2016 02:55:46 +0000 (19:55 -0700)]
Add 'pmid' to the default interwiki list, and update 'rfc'

As an alternative to using magic links, PMID was added to the default
interwiki list.

RFC already existed, but the URL in the default list was pointing to
rfc-editor.org, not the tools.ietf.org view like the RFC magic link or
Wikimedia interwiki map are.

Updating the default lists in maintenance/interwiki* only affects new
installations, so a post-database update maintenance script adds and
updates the two interwiki prefixes.

Bug: T147536
Change-Id: I5a2c2c9b0f989da62a4395c9516d880c7d923444

7 years agoMerge "Ignore reuseConnection() errors after LoadBalancer/LBFactory destruction"
jenkins-bot [Thu, 6 Oct 2016 21:41:38 +0000 (21:41 +0000)]
Merge "Ignore reuseConnection() errors after LoadBalancer/LBFactory destruction"

7 years agoMake ShowRawCssJs hook emit deprecated warnings
Reedy [Thu, 6 Oct 2016 13:37:54 +0000 (14:37 +0100)]
Make ShowRawCssJs hook emit deprecated warnings

Bug: T147392
Change-Id: Iae3b1532a91a9bf545a0a3c8df1df5e59b4974db

7 years agoMake WikiPage::prepareTextForEdit() emit deprecation warnings
Reedy [Thu, 6 Oct 2016 13:27:20 +0000 (14:27 +0100)]
Make WikiPage::prepareTextForEdit() emit deprecation warnings

Bug: T146168
Change-Id: I2f68d920bf39d787d5143cd5dba4e09cb3635fe0

7 years agoAdd @deprecated to Article::prepareTextForEdit()
Reedy [Thu, 6 Oct 2016 13:22:23 +0000 (14:22 +0100)]
Add @deprecated to Article::prepareTextForEdit()

Bug: T146166
Change-Id: Id7d56b49ebe058e022774d75aff2d11784d32fa5

7 years agoMerge "Use getConnectionRef() in ForeignDBViaLBRepo"
jenkins-bot [Thu, 6 Oct 2016 13:14:35 +0000 (13:14 +0000)]
Merge "Use getConnectionRef() in ForeignDBViaLBRepo"

7 years agoMerge "Fix numerous FileRepo IDEA warnings"
jenkins-bot [Thu, 6 Oct 2016 13:13:07 +0000 (13:13 +0000)]
Merge "Fix numerous FileRepo IDEA warnings"

7 years agoMerge "Revision->insertOn: Set READ_LATEST flag"
jenkins-bot [Thu, 6 Oct 2016 07:07:21 +0000 (07:07 +0000)]
Merge "Revision->insertOn: Set READ_LATEST flag"

7 years agoRevision->insertOn: Set READ_LATEST flag
Matthew Flaschen [Thu, 6 Oct 2016 04:31:30 +0000 (00:31 -0400)]
Revision->insertOn: Set READ_LATEST flag

Inserting new revisions requires master by definition.  Without this,
there can be problems when creating multiple revisions in a
transaction (i.e. a null revision pointed to a text_id borrowed
from a just-created revision).

Bug: T138310
Change-Id: I10773612f04b6525f9c8bc27a96bcb8a77831816

7 years agouse Wikimedia\ScopedCallback in WatchedItemStore
addshore [Wed, 5 Oct 2016 18:50:16 +0000 (19:50 +0100)]
use Wikimedia\ScopedCallback in WatchedItemStore

Change-Id: I4292c6098cc54536e3dbb2bcf19fca1288042535

7 years agoIgnore reuseConnection() errors after LoadBalancer/LBFactory destruction
Aaron Schulz [Thu, 6 Oct 2016 00:53:35 +0000 (17:53 -0700)]
Ignore reuseConnection() errors after LoadBalancer/LBFactory destruction

Bug: T147520
Change-Id: I9fe6acb0ab24127c1e9f3279129ff46c6b480873

7 years agoMerge "Make Revision::getText() emit deprecation warnings."
jenkins-bot [Thu, 6 Oct 2016 00:49:42 +0000 (00:49 +0000)]
Merge "Make Revision::getText() emit deprecation warnings."

7 years agoUse getConnectionRef() in ForeignDBViaLBRepo
Aaron Schulz [Thu, 6 Oct 2016 00:10:43 +0000 (17:10 -0700)]
Use getConnectionRef() in ForeignDBViaLBRepo

This assures that reuseConnection() will be called.

Change-Id: I6b9eb695d08045433ebb3204c0f72bcf63f21568

7 years agoMark 3 hooks deprecated by ContentHandler as such
Reedy [Wed, 5 Oct 2016 00:20:08 +0000 (01:20 +0100)]
Mark 3 hooks deprecated by ContentHandler as such

ArticleViewCustom, EditPageGetDiffText and EditPageGetPreviewText hooks
now marked as deprecated in 1.21.

TitleIsCssOrJsPage and TitleIsWikitextPage deprecation version dropped
from 1.25 to 1.21 to match other hooks.

Bug: T145728
Bug: T147382
Bug: T147383
Bug: T147384
Bug: T147385
Bug: T147386
Change-Id: I59b6b9f253857eb1040dad879a71e0d8cf141553

7 years agoFix numerous FileRepo IDEA warnings
Aaron Schulz [Wed, 5 Oct 2016 22:50:33 +0000 (15:50 -0700)]
Fix numerous FileRepo IDEA warnings

Change-Id: I3522f37b675efffb68dec9d125faacd8c8776e64

7 years agoMerge "Sync up with Parsoid parserTests."
jenkins-bot [Wed, 5 Oct 2016 22:36:12 +0000 (22:36 +0000)]
Merge "Sync up with Parsoid parserTests."

7 years agoSync up with Parsoid parserTests.
Arlo Breault [Wed, 5 Oct 2016 22:22:46 +0000 (15:22 -0700)]
Sync up with Parsoid parserTests.

This now aligns with Parsoid commit 5ce2da6623fbf6716d57f2cd25083ddfea97fe66

Change-Id: I3020cbbe620be05dd76778185f739f907fe5699b

7 years agoMerge "Add more information to reuseConnection() exceptions"
jenkins-bot [Wed, 5 Oct 2016 22:14:42 +0000 (22:14 +0000)]
Merge "Add more information to reuseConnection() exceptions"

7 years agoAdd more information to reuseConnection() exceptions
Aaron Schulz [Wed, 5 Oct 2016 22:02:59 +0000 (15:02 -0700)]
Add more information to reuseConnection() exceptions

Change-Id: Id2e6b275c8dc074fde460424178a2bc54f303d65

7 years agoMerge "ObjectCache::newFromParams fix SqlBagOStuff backcompat"
jenkins-bot [Wed, 5 Oct 2016 21:55:45 +0000 (21:55 +0000)]
Merge "ObjectCache::newFromParams fix SqlBagOStuff backcompat"

7 years agoObjectCache::newFromParams fix SqlBagOStuff backcompat
addshore [Wed, 5 Oct 2016 09:46:50 +0000 (10:46 +0100)]
ObjectCache::newFromParams fix SqlBagOStuff backcompat

Bug: T147407
Change-Id: I718d01b309d96deeb9f7aa1fdcdee9f824657f9d

7 years agoMerge "Make LoadMonitor use $serverIndexes in the cache key"
jenkins-bot [Wed, 5 Oct 2016 20:54:38 +0000 (20:54 +0000)]
Merge "Make LoadMonitor use $serverIndexes in the cache key"

7 years agoMerge "API: Add assertuser parameter"
jenkins-bot [Wed, 5 Oct 2016 20:48:27 +0000 (20:48 +0000)]
Merge "API: Add assertuser parameter"

7 years agoAPI: Add assertuser parameter
Brad Jorsch [Wed, 5 Oct 2016 14:35:47 +0000 (10:35 -0400)]
API: Add assertuser parameter

This was requested for the use of scripts that are concerned about the
possibility that the user might log in with a different account in
another browser window, thereby changing the expected user out from
underneath the script.

Bug: T146770
Change-Id: I94e0421cb263a418e86649f0d22ece4cfec6a395

7 years agoMerge "Localisation updates from https://translatewiki.net."
L10n-bot [Wed, 5 Oct 2016 20:14:39 +0000 (20:14 +0000)]
Merge "Localisation updates from https://translatewiki.net."

7 years agoMerge "Use a parameterized log for sub-optimal transaction logging"
jenkins-bot [Wed, 5 Oct 2016 20:13:06 +0000 (20:13 +0000)]
Merge "Use a parameterized log for sub-optimal transaction logging"

7 years agoMake LoadMonitor use $serverIndexes in the cache key
Aaron Schulz [Wed, 5 Oct 2016 19:47:10 +0000 (12:47 -0700)]
Make LoadMonitor use $serverIndexes in the cache key

* This avoids collisions of generic and custom LB group
  server list keys, which could cause warnings and errors.
* Remove $group param from scaleLoads(), which was unused
  and less robust for making keys anyway.
* Remove clearCaches() method, which only had one caller
  in a script that printed lag times in a loop. Its not
  worth keeping and having to pass in the server index
  list.
* Also guard scaleLoads() against recent server additions.

Bug: T147359
Change-Id: Idd15f0bebb68782fda36f483880cf7fe9673b940

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 5 Oct 2016 20:00:55 +0000 (22:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie4dfc8aa86398d16e2c7af45075e969c8c9a5969

7 years agoUse a parameterized log for sub-optimal transaction logging
Erik Bernhardson [Wed, 5 Oct 2016 19:30:18 +0000 (12:30 -0700)]
Use a parameterized log for sub-optimal transaction logging

In logstash these messages can't be grouped in any way, because they are
all slightly different. By using a parameterized log message these can
be grouped to give a better overview about the size of a problem.

Change-Id: Icfa957bd1775b49bccd6e9920586c94eb4597f9b

7 years agoMerge "ApiHelp: Add directionality to various things that are likely English-like"
jenkins-bot [Wed, 5 Oct 2016 18:12:43 +0000 (18:12 +0000)]
Merge "ApiHelp: Add directionality to various things that are likely English-like"

7 years agoMerge "ApiBase: Remove deprecated getResultData()"
jenkins-bot [Wed, 5 Oct 2016 18:09:48 +0000 (18:09 +0000)]
Merge "ApiBase: Remove deprecated getResultData()"

7 years agoApiSandbox: Ungrey the field label before disabling field label greying
Brad Jorsch [Wed, 5 Oct 2016 17:47:54 +0000 (13:47 -0400)]
ApiSandbox: Ungrey the field label before disabling field label greying

It appears that 5c8f9d8a4ce changed something to start greying out the
FieldLayout label, which is what we're specifically trying to avoid
here.

Bug: T147485
Change-Id: I3c3a3b0ea2176c94a247b8c0d4f99d1f090cb239

7 years agoobjectcache: add WANObjectCache::getMultiWithSetCallback()
Aaron Schulz [Tue, 13 Sep 2016 07:00:11 +0000 (00:00 -0700)]
objectcache: add WANObjectCache::getMultiWithSetCallback()

This does what it says on the tin, e.g. a way to fetch
multiple keys at once. Callbacks are still called in a
serial manner when needed.

Change-Id: I8e24a6de7f46499a53ec41636c5a4f106b9b3d09

7 years agoSetting flexible width on Special:Search results
Jan Drewniak [Wed, 5 Oct 2016 09:06:09 +0000 (11:06 +0200)]
Setting flexible width on Special:Search results

Because the search results are set to a static
width of 38em, they cause horizontal scrolling
on mobile devices. This patch changes the CSS
width to a max-width instead.

Bug: T138108
Change-Id: I14dbc6877d93183c523ce4ece57ec5968d4941cf

7 years agoMerge "Add a continuation button to ApiSandbox"
jenkins-bot [Wed, 5 Oct 2016 14:36:08 +0000 (14:36 +0000)]
Merge "Add a continuation button to ApiSandbox"

7 years agoAdd a continuation button to ApiSandbox
Gergő Tisza [Fri, 23 Sep 2016 01:50:05 +0000 (01:50 +0000)]
Add a continuation button to ApiSandbox

Change-Id: I4def43b2000b5639e3ced2643afea4b1288e28b0

7 years agoMerge "Make Special:MIMESearch non-expensive, again"
jenkins-bot [Wed, 5 Oct 2016 03:20:00 +0000 (03:20 +0000)]
Merge "Make Special:MIMESearch non-expensive, again"

7 years agoMerge "Pass Job success status to teardown callbacks"
jenkins-bot [Wed, 5 Oct 2016 03:02:59 +0000 (03:02 +0000)]
Merge "Pass Job success status to teardown callbacks"

7 years agoPass Job success status to teardown callbacks
Gergő Tisza [Wed, 5 Oct 2016 01:16:56 +0000 (01:16 +0000)]
Pass Job success status to teardown callbacks

Change-Id: Icf2e03efcfd9232fe4ead776096b61cef1c06141

7 years agoMake Revision::getText() emit deprecation warnings.
Reedy [Wed, 5 Oct 2016 00:55:49 +0000 (01:55 +0100)]
Make Revision::getText() emit deprecation warnings.

Bug: T147380
Change-Id: Idae98ee9360acc8f4593ff623ceef4dbb0d27c04

7 years agoMerge "mw.loader: Don't unset 'require' after execution in debug mode"
jenkins-bot [Tue, 4 Oct 2016 23:52:51 +0000 (23:52 +0000)]
Merge "mw.loader: Don't unset 'require' after execution in debug mode"

7 years agoMerge "Add an option to the title widget to exclude the current page"
jenkins-bot [Tue, 4 Oct 2016 22:45:07 +0000 (22:45 +0000)]
Merge "Add an option to the title widget to exclude the current page"

7 years agoMerge "Clean up some ObjectCache factory callers"
jenkins-bot [Tue, 4 Oct 2016 21:48:16 +0000 (21:48 +0000)]
Merge "Clean up some ObjectCache factory callers"

7 years agoMerge "Add the main stash, WAN, and server caches to MediaWikiServices"
jenkins-bot [Tue, 4 Oct 2016 21:45:12 +0000 (21:45 +0000)]
Merge "Add the main stash, WAN, and server caches to MediaWikiServices"

7 years agoMerge "parserTests: Do not check for DjVu support"
jenkins-bot [Tue, 4 Oct 2016 21:41:43 +0000 (21:41 +0000)]
Merge "parserTests: Do not check for DjVu support"

7 years agoMerge "Improve @covers tags for ComposerJson and ComposerLock tests"
jenkins-bot [Tue, 4 Oct 2016 21:31:34 +0000 (21:31 +0000)]
Merge "Improve @covers tags for ComposerJson and ComposerLock tests"

7 years agoMerge "page: Remove unused WikiPage::doQuickEditContent()"
jenkins-bot [Tue, 4 Oct 2016 21:31:31 +0000 (21:31 +0000)]
Merge "page: Remove unused WikiPage::doQuickEditContent()"

7 years agoMake DatabaseMysqlBase use connLogger for connection errors
Aaron Schulz [Tue, 4 Oct 2016 20:51:03 +0000 (13:51 -0700)]
Make DatabaseMysqlBase use connLogger for connection errors

Previously, they went to queryLogger, which is not the proper log.

Change-Id: Ifeea2261afc9572bf613a96306537f564b3e95d7

7 years agopage: Remove unused WikiPage::doQuickEditContent()
Timo Tijhof [Tue, 4 Oct 2016 21:06:38 +0000 (22:06 +0100)]
page: Remove unused WikiPage::doQuickEditContent()

This is a rather hakcy method that bypasses various cache invalidation
updates. This method shouldn't be (and, fortunately, isn't) called
anywhere in Wikimedia Git.

Change-Id: I03ede077294344c420827e4a6527d4c5fc3509b0

7 years agoAdd version to LoadMonitor::getCacheKey()
Aaron Schulz [Tue, 4 Oct 2016 21:04:20 +0000 (14:04 -0700)]
Add version to LoadMonitor::getCacheKey()

This avoids undefined index and "servers down" errors when
using Het Deploy since only the version has the new fields.

Bug: T147359
Change-Id: Ic2d0d147df2e1c015ec4a6675294203b2adf5ed9

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 4 Oct 2016 20:05:46 +0000 (22:05 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I6a0455fac2f7fb9d970ed4453628fbc0f4fd3c9f

7 years agoMerge "mw.ForeignStructuredUpload.BookletLayout: Check upload filename for local...
jenkins-bot [Tue, 4 Oct 2016 18:50:41 +0000 (18:50 +0000)]
Merge "mw.ForeignStructuredUpload.BookletLayout: Check upload filename for local duplicates"

7 years agomw.ForeignStructuredUpload.BookletLayout: Check upload filename for local duplicates
Matthias Mullie [Thu, 15 Sep 2016 17:23:35 +0000 (19:23 +0200)]
mw.ForeignStructuredUpload.BookletLayout: Check upload filename for local duplicates

Bug: T117498
Change-Id: I9efd067b0f79eba7513ad245e22d11dedc71051e

7 years agoMerge "Don't use Config as an access method for global objects"
jenkins-bot [Tue, 4 Oct 2016 17:12:50 +0000 (17:12 +0000)]
Merge "Don't use Config as an access method for global objects"

7 years agomw.loader: Don't unset 'require' after execution in debug mode
Timo Tijhof [Fri, 30 Sep 2016 23:59:28 +0000 (00:59 +0100)]
mw.loader: Don't unset 'require' after execution in debug mode

Follows-up bc4e07b6f6.

In production mode, 'module' and 'require' are lexically provided
through closure to the executing script and will continue to be
accessible through the script's life-time.

In debug mode, the script executes without wrapper directly from
disk (and as such, in the global scope) and variables are provided
as global variables. Since a variable can only be set to one value,
we swap the object that 'module' points to after each file. And
to avoid leakage, it is removed in-between files and after the
last one. Aside from it being technically infeasible right now,
async access to 'module' is discouraged regardless.

Late access to 'require', however, is not uncommon and should
work as expected.

Bug: T144879
Change-Id: I6ede10fd42676bb035ea26c693c78bcdc1438a7d

7 years agoMediaWiki core messages for Livvi-Karelian (olo)
MarcoAurelio [Thu, 29 Sep 2016 08:26:10 +0000 (10:26 +0200)]
MediaWiki core messages for Livvi-Karelian (olo)

Bug: T146744
Change-Id: Ia95d821d2efd623cd75959c9cfe78fe68d184db6

7 years agoDon't use Config as an access method for global objects
Florian Schmidt [Tue, 4 Oct 2016 15:40:35 +0000 (17:40 +0200)]
Don't use Config as an access method for global objects

The Config interface (and it's implementation(s)) was never thought
to be an access method for objects saved in the global state, even
if it works with the current implementation GlobalVarConfig.

Imagine, that MediaWiki core switches to another file-based configuratiion
storage or a a database based one, we wouldn't be able to provide
access to global objects anymore, without weird hacks in the new
config-backend implementation or serializing objects to store in
the database or something else. This all isn't the idea with the Config
interface, as far as I know, so don't use it at all.

This commit changes the access to wgContLang to use the global keyword,
instead of accessing it through Config.

Follow up: Ice4f40911c3761c2542430935bc1898bc4e7a4d4
Follow up: I46f376a82205a5c99b98c9e971f9e9d7868ce9fb

Change-Id: I7a08b3bb649898abd445317a523051b07420b211

7 years agoMerge "Avoid 'message' in log context in AuthManager"
jenkins-bot [Tue, 4 Oct 2016 14:58:28 +0000 (14:58 +0000)]
Merge "Avoid 'message' in log context in AuthManager"

7 years agoMerge "wgRateLimits: Add configuration option to ignore 'noratelimit' right"
jenkins-bot [Tue, 4 Oct 2016 14:41:59 +0000 (14:41 +0000)]
Merge "wgRateLimits: Add configuration option to ignore 'noratelimit' right"

7 years agoMake server index validity checks in LoadBalancer actually work
Aaron Schulz [Tue, 4 Oct 2016 11:24:25 +0000 (04:24 -0700)]
Make server index validity checks in LoadBalancer actually work

Change-Id: I8f0fd802ee3ce67903af5a83ec07dc0506ec84ba

7 years agoAdd missing array_keys() call to scaleLoads()
Aaron Schulz [Tue, 4 Oct 2016 11:16:21 +0000 (04:16 -0700)]
Add missing array_keys() call to scaleLoads()

Bug: T147240
Change-Id: I110f43b5990fe42b2d7f1ec960a55a1ae4aa4253

7 years agoImprove Database::factory() $driver validation
Aaron Schulz [Tue, 4 Oct 2016 05:35:51 +0000 (22:35 -0700)]
Improve Database::factory() $driver validation

Change-Id: Ie034e6f2f94f0f1731dbe2468f075297d5a171a2

7 years agoDocument that RequestContext::setTitle's $title can be null
Marius Hoch [Tue, 4 Oct 2016 07:01:54 +0000 (09:01 +0200)]
Document that RequestContext::setTitle's $title can be null

Change-Id: Ibd004fd79c374533128574fb1bf5d3edbd82a17d

7 years agoMerge "Move most of MWCryptRand into libs"
jenkins-bot [Tue, 4 Oct 2016 05:57:32 +0000 (05:57 +0000)]
Merge "Move most of MWCryptRand into libs"

7 years agoMove most of MWCryptRand into libs
Kunal Mehta [Sun, 2 Oct 2016 07:04:17 +0000 (00:04 -0700)]
Move most of MWCryptRand into libs

Dependency-inject the MW-specific parts of MWCryptRand via
MediaWikiServices into a generic CryptRand class that is in libs/.

Note that this removes the wfGetAllCallers() debug logging from
generate().

Change-Id: I9742735c266ee69fb247199d3c553cd2ad2a3987

7 years agowgRateLimits: Add configuration option to ignore 'noratelimit' right
Bryan Davis [Tue, 4 Oct 2016 04:46:30 +0000 (22:46 -0600)]
wgRateLimits: Add configuration option to ignore 'noratelimit' right

It may be reasonable to ignore the 'noratelimit' right granted to a user
when perfuming some rate limit checks. As an example, a rate limit check
on failed authentication attempts should not be bypassed.

Add an optional '&can-bypass' configuration option for each
$wgRateLimits action that can be set to false to disable checking
User::isPingLimitable(). This bypasses both 'noratelimit' and
$wgRateLimitsExcludedIPs exclusions.

Depends-On: Iacdd1719d5f08eca91de0a35c0042ffee2136f34
Change-Id: Ia3add8bbbab0307f036e9b77e752c382da3a0d04

7 years agoMerge "Move MWCryptHash into libs/"
jenkins-bot [Tue, 4 Oct 2016 04:33:06 +0000 (04:33 +0000)]
Merge "Move MWCryptHash into libs/"

7 years agoMerge "Set default load monitor class in LBFactoryMulti"
jenkins-bot [Tue, 4 Oct 2016 03:06:19 +0000 (03:06 +0000)]
Merge "Set default load monitor class in LBFactoryMulti"

7 years agoSet default load monitor class in LBFactoryMulti
Aaron Schulz [Tue, 4 Oct 2016 02:57:45 +0000 (19:57 -0700)]
Set default load monitor class in LBFactoryMulti

Bug: T147240
Change-Id: I6d1c86e714d537f43b01bbf9581032aec2a4e59b

7 years agoMerge "http: Use Psr\Log instead of wfDebug*"
jenkins-bot [Tue, 4 Oct 2016 02:55:41 +0000 (02:55 +0000)]
Merge "http: Use Psr\Log instead of wfDebug*"

7 years agoMerge "Split HttpFunctions.php into separate files"
jenkins-bot [Tue, 4 Oct 2016 02:54:50 +0000 (02:54 +0000)]
Merge "Split HttpFunctions.php into separate files"

7 years agoMerge "Remove pre-5.5 compat from MultiHttpClient"
jenkins-bot [Tue, 4 Oct 2016 02:49:29 +0000 (02:49 +0000)]
Merge "Remove pre-5.5 compat from MultiHttpClient"

7 years agoMerge "Restore Content-Language header change from e53ff931a"
jenkins-bot [Tue, 4 Oct 2016 02:24:30 +0000 (02:24 +0000)]
Merge "Restore Content-Language header change from e53ff931a"

7 years agoMerge "Revert "Localisation updates from https://translatewiki.net.""
jenkins-bot [Tue, 4 Oct 2016 02:01:21 +0000 (02:01 +0000)]
Merge "Revert "Localisation updates from https://translatewiki.net.""

7 years agoRevert "Localisation updates from https://translatewiki.net."
Bartosz Dziewoński [Tue, 4 Oct 2016 01:54:09 +0000 (01:54 +0000)]
Revert "Localisation updates from https://translatewiki.net."

Broke the tests.

This reverts commit 17ef4586787be33bf00980c42516bed6643656b3.

Bug: T147245
Change-Id: Ic5db3a4243c9543e12852faecf4f2425b16bab39

7 years agoAvoid 'message' in log context in AuthManager
Gergő Tisza [Sat, 1 Oct 2016 01:10:56 +0000 (01:10 +0000)]
Avoid 'message' in log context in AuthManager

Logstash merges the log context into the main metadata (where
'message' is the log message) and ends up overwriting the message.

Bug: T145133
Change-Id: I27f221b0f1f7203e93d1b92119dc584ba8526f5b

7 years agoImplement scaleLoads() in LoadMonitorMySQL
Aaron Schulz [Thu, 15 Sep 2016 07:04:41 +0000 (00:04 -0700)]
Implement scaleLoads() in LoadMonitorMySQL

* Recently pooled servers will get more traffic as
  their internal caches warm up by getting queries
* Also let LoadMonitor support options for flexibility
  The "loadMonitor" config field now takes in array in
  LoadBalancer.
* Make LoadMonitor the default instead of LoadMonitorNull.

Change-Id: I53b89b0c25bdcc30deec3f8b502fb14479c53ae8

7 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 3 Oct 2016 19:54:31 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib172a5e6cb38c20cf4149e1735272c27192bc8b6

7 years agoUpdate OOjs UI to v0.17.10
James D. Forrester [Mon, 3 Oct 2016 19:01:38 +0000 (12:01 -0700)]
Update OOjs UI to v0.17.10

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

Change-Id: I4faf83e301417ef5721a81a4a69890854e6c266b

7 years agoClean up some ObjectCache factory callers
Aaron Schulz [Thu, 29 Sep 2016 03:59:11 +0000 (20:59 -0700)]
Clean up some ObjectCache factory callers

* Use services container in more places.
* Undeprecated getLocalServerInstance() since $fallback is not
  handled elsewhere.

Change-Id: Id1fcd1c465d2d92653357523f4225f1c4d1ace2f

7 years agoAdd the main stash, WAN, and server caches to MediaWikiServices
Aaron Schulz [Thu, 29 Sep 2016 19:36:27 +0000 (12:36 -0700)]
Add the main stash, WAN, and server caches to MediaWikiServices

Leave getLocalServerInstance() array fallback logic.

Restores 6d99fa58247a1de7eaf9a79a061f0b4207154072
Which got reverted by 7ab928329235451aaa0a813fc16e37cf44d8999a.

Change-Id: Id1f48e10753d6aaf64eecb4d3c2228740abc1340

7 years agoPassword reset link is shown when no reset options are available
Huji Lee [Mon, 3 Oct 2016 18:34:50 +0000 (14:34 -0400)]
Password reset link is shown when no reset options are available

Bug: T144705
Change-Id: I7d6b563e32039e7313121de9629f02ad4f02d351

7 years agoMerge "action=history should return 404 if there is no such page"
jenkins-bot [Mon, 3 Oct 2016 18:19:17 +0000 (18:19 +0000)]
Merge "action=history should return 404 if there is no such page"

7 years agoMerge "Fix Database IDEA warnings about callable parameters"
jenkins-bot [Mon, 3 Oct 2016 18:15:59 +0000 (18:15 +0000)]
Merge "Fix Database IDEA warnings about callable parameters"

7 years agoMerge "mw.feedback: Use standard OOjs UI dialog error handling"
jenkins-bot [Mon, 3 Oct 2016 18:10:26 +0000 (18:10 +0000)]
Merge "mw.feedback: Use standard OOjs UI dialog error handling"

7 years agoRestore Content-Language header change from e53ff931a
Aaron Schulz [Fri, 30 Sep 2016 22:48:14 +0000 (15:48 -0700)]
Restore Content-Language header change from e53ff931a

This was lost in a rebase at some point.

Change-Id: I46f376a82205a5c99b98c9e971f9e9d7868ce9fb

7 years agoFix Database IDEA warnings about callable parameters
Aaron Schulz [Mon, 3 Oct 2016 17:48:58 +0000 (10:48 -0700)]
Fix Database IDEA warnings about callable parameters

Change-Id: Ia9ccc86bb9cbd78b5890ceaedce8cca8d6bb7fe4

7 years agoMerge "Remove cruft from interwiki.list and interwiki.sql"
jenkins-bot [Mon, 3 Oct 2016 11:06:48 +0000 (11:06 +0000)]
Merge "Remove cruft from interwiki.list and interwiki.sql"

7 years agoMerge "Enable deprecation warnings for WikiPage::getText()"
jenkins-bot [Mon, 3 Oct 2016 01:45:47 +0000 (01:45 +0000)]
Merge "Enable deprecation warnings for WikiPage::getText()"

7 years agoMerge "Update wikimedia/php-session-serializer to v1.0.4"
jenkins-bot [Mon, 3 Oct 2016 01:34:03 +0000 (01:34 +0000)]
Merge "Update wikimedia/php-session-serializer to v1.0.4"

7 years agoMerge "Add primary key to change_tag and tag_summary tables"
jenkins-bot [Mon, 3 Oct 2016 01:08:44 +0000 (01:08 +0000)]
Merge "Add primary key to change_tag and tag_summary tables"