lhc/web/wiklou.git
3 years agoMerge "mediawiki.language: Implement non-digit-grouping of four-digit numbers"
jenkins-bot [Fri, 23 Mar 2018 10:07:46 +0000 (10:07 +0000)]
Merge "mediawiki.language: Implement non-digit-grouping of four-digit numbers"

3 years agoMerge "Add missing return types to User::getOption()"
jenkins-bot [Fri, 23 Mar 2018 01:41:28 +0000 (01:41 +0000)]
Merge "Add missing return types to User::getOption()"

3 years agoAdd missing return types to User::getOption()
Sam Wilson [Fri, 23 Mar 2018 01:14:41 +0000 (09:14 +0800)]
Add missing return types to User::getOption()

String zeros are converted to ints, and email-blacklist returns
an array of integers.

Change-Id: I2ac2a4e8effd4816e9c1e835b86241c7fe850605

3 years agoRemove 0.8em default overlay hack
Ed Sanders [Fri, 23 Mar 2018 00:42:46 +0000 (00:42 +0000)]
Remove 0.8em default overlay hack

This fixes the font size on Special:ApiSandbox when expanded.

Change-Id: I72d825f0da014383f5b82272a816f09f41c6027b

3 years agoMerge "rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id"
jenkins-bot [Fri, 23 Mar 2018 00:03:20 +0000 (00:03 +0000)]
Merge "rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id"

3 years agordbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id
Aaron Schulz [Wed, 7 Feb 2018 10:15:54 +0000 (02:15 -0800)]
rdbms: make getMasterPos() ignore GTIDs outside of gtid_domain_id

* Filter out GTIDs with a domain that is not the one binlog
  events would be written to if the Database handle was given
  write queries. Likewise for the MariaDB server_id component.
* Also improve MySQL GTID support to better match that of MariaDB.
  This covers position retrieval, replication waiting, and ranges
  in GTIDs (which are almost always present).
* Make some MySQLMasterPos variables private by making use of
  accesors instead.
* Store the gtids array keyed by domain ID for convenience.
* Clean up dynamic call to static method.

Change-Id: Ic6ab517bc8f200c968ff892ade69ad1b9394ab21

3 years agoUse OOUI's checkAll instead of doubleCheck from Echo
Ed Sanders [Thu, 22 Mar 2018 22:34:50 +0000 (22:34 +0000)]
Use OOUI's checkAll instead of doubleCheck from Echo

Not least because Echo might not be installed.

Change-Id: I44a439c6b924b8d88585ea7a2e613d505e16724f

3 years agoMerge "User: Fully clear instance variables when loading not-blocked status"
jenkins-bot [Thu, 22 Mar 2018 21:40:07 +0000 (21:40 +0000)]
Merge "User: Fully clear instance variables when loading not-blocked status"

3 years agoMerge "rdbms: IDatabase interface cleanups"
jenkins-bot [Thu, 22 Mar 2018 21:27:08 +0000 (21:27 +0000)]
Merge "rdbms: IDatabase interface cleanups"

3 years agoMerge "mediawiki.ui: Update mw-ui-input padding/line-height to match OOUI"
jenkins-bot [Thu, 22 Mar 2018 21:16:12 +0000 (21:16 +0000)]
Merge "mediawiki.ui: Update mw-ui-input padding/line-height to match OOUI"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 22 Mar 2018 20:53:16 +0000 (21:53 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ib6ba336283368bb086c8f1225ac2b7a94b2ec338

3 years agoMerge "rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization"
jenkins-bot [Thu, 22 Mar 2018 19:34:02 +0000 (19:34 +0000)]
Merge "rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization"

3 years agoUser: Fully clear instance variables when loading not-blocked status
Brad Jorsch [Thu, 22 Mar 2018 16:52:59 +0000 (12:52 -0400)]
User: Fully clear instance variables when loading not-blocked status

If a block is deleted and ->clearInstanceCache() is called to try to
make an existing User object reflect that fact, some methods are still
reflecting the old block.

To fix this, User::getBlockedStatus() needs to clear all the relevant
instance variables if the user is found not to be blocked.

Change-Id: I6ad8d5555a4c8519336aded3067e5034831dadf3

3 years agomediawiki.ui: Update mw-ui-input padding/line-height to match OOUI
Ed Sanders [Thu, 22 Mar 2018 18:50:27 +0000 (18:50 +0000)]
mediawiki.ui: Update mw-ui-input padding/line-height to match OOUI

Change-Id: Ic67973f994fd28b1e5f09ddf203a3217a705befb

3 years agordbms: IDatabase interface cleanups
Aaron Schulz [Thu, 22 Mar 2018 15:33:59 +0000 (08:33 -0700)]
rdbms: IDatabase interface cleanups

* Move schema-change related methods listTables(), indexUnique(),
  and fieldInfo() to IMaintainableDatabase
* Deprecate doneWrites()
* Remove reportQueryError() and reportConnectionError(),
  leaving them to Database

Bug: T190396
Change-Id: I96f298d5a6eca67f5a289f205406bf3135ece62d

3 years agoDo not assume rc_patrolled is binary in ChangesListSpecialPage
Amir Sarabadani [Thu, 22 Mar 2018 12:57:28 +0000 (13:57 +0100)]
Do not assume rc_patrolled is binary in ChangesListSpecialPage

Bug: T184791
Change-Id: Idd9fc4b37da2d862f84d3aacd9966872958bc9eb

3 years agordbms: Add ATOMIC_CANCELABLE flag for micro-optimization
Brad Jorsch [Tue, 20 Mar 2018 15:57:04 +0000 (11:57 -0400)]
rdbms: Add ATOMIC_CANCELABLE flag for micro-optimization

Aaron is concerned about the extra time added to atomic sections within
an outer transaction if we do a SAVEPOINT and RELEASE. He wants a flag
so callers have to specifically opt-in to use of savepoints.

Change-Id: I64cf5033ced464863d28dd49d9173856a9c1e1c0

3 years agordbms: Add IDatabase::cancelAtomic()
Brad Jorsch [Sat, 17 Mar 2018 21:59:56 +0000 (17:59 -0400)]
rdbms: Add IDatabase::cancelAtomic()

Atomic sections are currently useful if you want to wrap some SQL
statements in a transaction when you might be called from inside someone
else's transaction, and you expect the caller to roll back everything if
you fail.

But there are some cases where you want to allow the caller to recover
from errors, in which case you need to roll back just the atomic
section. Savepoints are supported by all our databases and can be used
for this purpose, so let's do so.

Bug: T188660
Change-Id: Iee548619df89fd7fbd581b01106b8b41d3df71cc

3 years agoMerge "rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()"
jenkins-bot [Thu, 22 Mar 2018 01:07:06 +0000 (01:07 +0000)]
Merge "rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()"

3 years agoMerge "rdbms: cleanup runMasterPostTrxCallbacks() transaction check"
jenkins-bot [Thu, 22 Mar 2018 01:05:05 +0000 (01:05 +0000)]
Merge "rdbms: cleanup runMasterPostTrxCallbacks() transaction check"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 21 Mar 2018 21:16:38 +0000 (22:16 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Iaf3c46a2ead6b5cb3758c5c779b90c213aedfeee

3 years agoMerge "Convert OutputHandler functions to a class"
jenkins-bot [Wed, 21 Mar 2018 20:56:22 +0000 (20:56 +0000)]
Merge "Convert OutputHandler functions to a class"

3 years agoMerge "Clarify -{ => {{ transition"
jenkins-bot [Wed, 21 Mar 2018 20:37:20 +0000 (20:37 +0000)]
Merge "Clarify -{ => {{ transition"

3 years agoMerge "Update OOUI to v0.26.0"
jenkins-bot [Wed, 21 Mar 2018 19:55:47 +0000 (19:55 +0000)]
Merge "Update OOUI to v0.26.0"

3 years agoMerge "exception: Improve formatting of fatal error log messages"
jenkins-bot [Wed, 21 Mar 2018 19:52:37 +0000 (19:52 +0000)]
Merge "exception: Improve formatting of fatal error log messages"

3 years agoMerge "rdbms: fix bogus $fname parameter in LoadMonitorMySQL"
jenkins-bot [Wed, 21 Mar 2018 19:39:25 +0000 (19:39 +0000)]
Merge "rdbms: fix bogus $fname parameter in LoadMonitorMySQL"

3 years agoexception: Improve formatting of fatal error log messages
Gergő Tisza [Fri, 16 Mar 2018 02:40:07 +0000 (19:40 -0700)]
exception: Improve formatting of fatal error log messages

Use human-readable stack trace instead of array dump,
try to display the URL and the request ID, use the same
message format as exceptions,

Bug: T189851
Change-Id: I3edf2dbd5639ceecc668719c065ecdce33157ff5

3 years agoMerge "parser: Update MWTidy::checkErrors() error message"
Krinkle [Wed, 21 Mar 2018 19:21:13 +0000 (19:21 +0000)]
Merge "parser: Update MWTidy::checkErrors() error message"

3 years agoUpdate OOUI to v0.26.0
Volker E [Wed, 21 Mar 2018 00:36:37 +0000 (17:36 -0700)]
Update OOUI to v0.26.0

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

Depends-on: Ic1d39a0ea9d44638f8af174592cee070bad89cc7
Change-Id: Ib4789239c10c2c505af8a743cd6f4474fcabe446

3 years agoMerge "Update purtle to 1.0.7"
jenkins-bot [Wed, 21 Mar 2018 19:11:31 +0000 (19:11 +0000)]
Merge "Update purtle to 1.0.7"

3 years agoUpdate purtle to 1.0.7
Stanislav Malyshev [Wed, 21 Mar 2018 18:39:55 +0000 (11:39 -0700)]
Update purtle to 1.0.7

Companion vendor change is https://gerrit.wikimedia.org/r/c/420911/

Bug: T185589
Change-Id: Ic3b4e902c212adbd25f7364259e3767d4e1dfb7a

3 years agoMerge "Test ApiDisabled.php"
jenkins-bot [Wed, 21 Mar 2018 17:04:20 +0000 (17:04 +0000)]
Merge "Test ApiDisabled.php"

3 years agoMerge "rdbms: make selectRowCount() use $var argument to exclude NULLs"
jenkins-bot [Wed, 21 Mar 2018 16:45:33 +0000 (16:45 +0000)]
Merge "rdbms: make selectRowCount() use $var argument to exclude NULLs"

3 years agoMerge "Selenium: Replace nodemw with mwbot"
jenkins-bot [Wed, 21 Mar 2018 15:17:06 +0000 (15:17 +0000)]
Merge "Selenium: Replace nodemw with mwbot"

3 years agoMerge "Selenium: Do not run CirrusSearch smoke tests in Jenkins"
jenkins-bot [Wed, 21 Mar 2018 14:42:37 +0000 (14:42 +0000)]
Merge "Selenium: Do not run CirrusSearch smoke tests in Jenkins"

3 years agoMerge "Selenium: Upgrade WebdriverIO to 4.12.0"
jenkins-bot [Wed, 21 Mar 2018 14:37:30 +0000 (14:37 +0000)]
Merge "Selenium: Upgrade WebdriverIO to 4.12.0"

3 years agoSelenium: Replace nodemw with mwbot
Željko Filipin [Fri, 9 Mar 2018 12:34:28 +0000 (13:34 +0100)]
Selenium: Replace nodemw with mwbot

Bug: T181284
Change-Id: I012a5cc6a7f30a8652cbad87293eb119fa2e405f
Depends-On: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3

3 years agoSelenium: Upgrade WebdriverIO to 4.12.0
Željko Filipin [Tue, 13 Mar 2018 13:30:43 +0000 (14:30 +0100)]
Selenium: Upgrade WebdriverIO to 4.12.0

Bug: T180144
Change-Id: I8d34e2240fe76798c99315a54ea5bab63b2409e9
Depends-On: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3

3 years agoSelenium: Do not run CirrusSearch smoke tests in Jenkins
Željko Filipin [Tue, 20 Mar 2018 17:54:53 +0000 (18:54 +0100)]
Selenium: Do not run CirrusSearch smoke tests in Jenkins

Bug: T190039
Change-Id: I3b6ce071ce69ef3d6ea719d875428422f9ad7e6d
Depends-On: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3

3 years agoLock postcss-less to v1.1.3 because v 1.1.4 breaks CI
Željko Filipin [Wed, 21 Mar 2018 12:15:01 +0000 (13:15 +0100)]
Lock postcss-less to v1.1.3 because v 1.1.4 breaks CI

mediawiki-core-npm-node-6-docker Jenkins job is failing with
`Warning: Task "stylelint:src" failed.`

Bug: T190269
Change-Id: Ic69be92c2b0b7a08a9b8cc417a40ebb38f249ea3

3 years agoConvert OutputHandler functions to a class
Timo Tijhof [Sun, 18 Mar 2018 04:03:42 +0000 (21:03 -0700)]
Convert OutputHandler functions to a class

* Convert OutputHandler.php from global functions to a class.

  - wfOutputHandler → OutputHandler::handle
    (no alias, no usage outside core)
  - wfGzipHandler → OutputHandler::handleGzip
    (private, no usage outside class)
  - wfRequestExtension → OutputHandler::findUriExtension
    (private, no usage outside class)
  - wfMangleFlashPolicy → OutputHandler::mangleFlashPolicy
    (private, no usage outside class)
  - wfDoContentLength → OutputHandler::emitContentLength
    (private, no usage outside class)
  - wfHtmlValidationHandler → OutputHandler::validateAllHtml
    (private, no usage outside class)

* Add the class to autoload.php for exposure outside WebStart.
  Specifically, for use in ApiFormatPhpTest. This also removes the
  need to manually load the class because this code runs after
  Setup.php loads AutoLoader.php.

Bug: T189966
Change-Id: I27a41ec0ae0ee30aeb313a616323b967605c4055

3 years agoparser: Update MWTidy::checkErrors() error message
Timo Tijhof [Sun, 18 Mar 2018 04:33:32 +0000 (21:33 -0700)]
parser: Update MWTidy::checkErrors() error message

When setting the following on PHP 7, the produced error message
did not make sense (references something about HHVM).

 > $wgValidateAllHtml = true
 > $wgTidyConfig = ['driver' => 'RemexHtml'];

Change-Id: I5f14505639a79aca66f570a9a00c38cdea0cc1ba

3 years agoMerge "HTMLSizeFilterField: Add OOUI version"
jenkins-bot [Wed, 21 Mar 2018 00:29:39 +0000 (00:29 +0000)]
Merge "HTMLSizeFilterField: Add OOUI version"

3 years agoresourceloader: Remove redundant state assignment for styles in ClientHtml
Timo Tijhof [Mon, 5 Mar 2018 23:15:24 +0000 (15:15 -0800)]
resourceloader: Remove redundant state assignment for styles in ClientHtml

The same variable index was set to the same value from two places,
one unconditionally, and two times within a conditional block after
the first one.

The second ones are a completely redundant remnant from a refactor
sometime last year.

Change-Id: Ia234d4aca398b1b365d457a439d9e449229f28fb

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 20 Mar 2018 20:56:11 +0000 (21:56 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie14e1f3bd7c920c93c0fb9d73619985125a5fc08

3 years agoMerge "rdbms: upgrade transaction misuse warnings to exceptions"
jenkins-bot [Tue, 20 Mar 2018 20:20:08 +0000 (20:20 +0000)]
Merge "rdbms: upgrade transaction misuse warnings to exceptions"

3 years agoMerge "phpunit: Add some @covers and @large/@medium to integration tests"
jenkins-bot [Tue, 20 Mar 2018 17:51:28 +0000 (17:51 +0000)]
Merge "phpunit: Add some @covers and @large/@medium to integration tests"

3 years agordbms: upgrade transaction misuse warnings to exceptions
Aaron Schulz [Fri, 9 Mar 2018 00:58:48 +0000 (16:58 -0800)]
rdbms: upgrade transaction misuse warnings to exceptions

The last warnings in logstash for WMF have been cleaned up

Change-Id: I7d5bb624bc583191c3a0c95aa4e99322d6d5008c

3 years agophpunit: Add some @covers and @large/@medium to integration tests
Timo Tijhof [Tue, 20 Mar 2018 16:14:34 +0000 (09:14 -0700)]
phpunit: Add some @covers and @large/@medium to integration tests

- @small: single class, no I/O (unit test).
- @medium: multi-class (partial or no mocks), no I/O (unit/integration test).
- @large: multi-class, I/O allowed (integration test).

Change-Id: I09317e6dd9b0ee34b7467fbffdd07957ef55dc04

3 years agoSync up with Parsoid parserTests.txt
Subramanya Sastry [Tue, 20 Mar 2018 16:09:40 +0000 (11:09 -0500)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 3f79aa9fd48e68d32d1b9bdc3e29ec4536f297b8

Change-Id: I12249e39ddc6e3344a9dd8a1545b129ed469e184

3 years agoTest ApiDisabled.php
Aryeh Gregor [Tue, 20 Mar 2018 16:01:07 +0000 (18:01 +0200)]
Test ApiDisabled.php

Locally this reports that everything is covered, although the get*()
functions are not registering at all (white backgrounds).

Change-Id: I73fabfb33b329dc3416368fda52d35f7ee6a4a18

3 years agoMerge "RFC T157418: Trim whitespace in table cells, list items, headings"
jenkins-bot [Tue, 20 Mar 2018 15:26:06 +0000 (15:26 +0000)]
Merge "RFC T157418: Trim whitespace in table cells, list items, headings"

3 years agordbms: fix bogus $fname parameter in LoadMonitorMySQL
Aaron Schulz [Tue, 20 Mar 2018 14:46:16 +0000 (07:46 -0700)]
rdbms: fix bogus $fname parameter in LoadMonitorMySQL

Change-Id: Ib8862532362da148ddd6296646fba7483c6463d5

3 years agoMerge "MCR: replace slot_inherited with slot_origin"
jenkins-bot [Tue, 20 Mar 2018 12:06:32 +0000 (12:06 +0000)]
Merge "MCR: replace slot_inherited with slot_origin"

3 years agoMerge "Revert "Selenium: configuration file for beta cluster""
jenkins-bot [Tue, 20 Mar 2018 11:19:51 +0000 (11:19 +0000)]
Merge "Revert "Selenium: configuration file for beta cluster""

3 years agoRevert "Selenium: configuration file for beta cluster"
Zfilipin [Tue, 20 Mar 2018 11:12:27 +0000 (11:12 +0000)]
Revert "Selenium: configuration file for beta cluster"

This reverts commit 3d2395a2af962b9bb941f3bbd819578f2b6b2d65.

Change-Id: I4ad8958df097a1ef011c0f9d99ea9f7a0030c032

3 years agoMerge "Set WebInstaller session variables as globals"
jenkins-bot [Tue, 20 Mar 2018 04:21:12 +0000 (04:21 +0000)]
Merge "Set WebInstaller session variables as globals"

3 years agoFix XMPReader/XMPValidator for PHP 7
Brion Vibber [Fri, 9 Mar 2018 19:54:19 +0000 (11:54 -0800)]
Fix XMPReader/XMPValidator for PHP 7

Tripped up by old typos being caught in new warnings on
PHP 7.x: was checking a scalar's count when meant to
check its containing array's count, and was using a str
"\0" where a literal 0 should have been used (now considered
non-numeric).

Tested locally on 7.2

Bug: T182365
Change-Id: If79a73032d6b63cc41135ccafb6900aeb7787b02

3 years agoMerge "rdbms: add IDatabase::wasConnectionLoss() method"
jenkins-bot [Tue, 20 Mar 2018 02:41:28 +0000 (02:41 +0000)]
Merge "rdbms: add IDatabase::wasConnectionLoss() method"

3 years agoSet WebInstaller session variables as globals
Gergő Tisza [Tue, 20 Mar 2018 01:35:43 +0000 (18:35 -0700)]
Set WebInstaller session variables as globals

During the install process LocalSettings.php does not exist
yet so globals simply take their values from DefaultSettings.php.
The installer uses the correct settings directly for e.g. database
operations, but this blows up when something tries to use
MediaWikiServices which is hardcoded to work with globals.

Make the installer update the globals to work around this.

Bug: T187586
Change-Id: I042099c399bc58929e83178f61e6e6ca478a3ee6

3 years agordbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()
Aaron Schulz [Mon, 19 Mar 2018 23:20:15 +0000 (16:20 -0700)]
rdbms: clean up DBO_TRX behavior for onTransactionPreCommitOrIdle()

* Make sure cancelled onTransactionPreCommitOrIdle() callbacks do not
  run if a transaction round is rolled back and then a second round is
  committed. LoadBalancer::rollbackMasterChanges() now always calls
  rollback(), which in turn always cleans up such callbacks.
* Remove error logging for rollback() calls when trxLevel = 0; this is
  harmless and is sometimes hard to avoid in error handling anyway.
* Add more related unit tests.

Change-Id: I6bdefe8bf8b6630fc252b5bbafe4808758ba1684

3 years agordbms: add IDatabase::wasConnectionLoss() method
Aaron Schulz [Tue, 20 Mar 2018 00:26:49 +0000 (17:26 -0700)]
rdbms: add IDatabase::wasConnectionLoss() method

This takes the logic from wasErrorReissuable(), but puts it under
better name. The way that method was used, as well its comments,
were only about connection loss.

Make wasErrorReissuable() check if there was any error that
does not preclude the ability to retry. This matches the actual
name of the method.

Also improve some other related comments.

Change-Id: I68455d803afb2370897fecab0e79aadbb5d1a740

3 years agordbms: define wasLockTimeout() for postgres
Aaron Schulz [Tue, 20 Mar 2018 01:08:37 +0000 (18:08 -0700)]
rdbms: define wasLockTimeout() for postgres

Change-Id: Ic54530f0b48fb3e3a42c1e6e95a5a75c6b5c061d

3 years agordbms: cleanup runMasterPostTrxCallbacks() transaction check
Aaron Schulz [Tue, 20 Mar 2018 00:17:24 +0000 (17:17 -0700)]
rdbms: cleanup runMasterPostTrxCallbacks() transaction check

This does not actually care about pending callbacks, and indeed there
are expected to likely be some (which it runs a few lines later).

Change-Id: If966a518893dedeb48bbeca87daedb417e5abd92

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 19 Mar 2018 21:02:15 +0000 (22:02 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I484a2f4f3606d6a6aab12011a8ce7ab7379ea3e6

3 years agoMCR: replace slot_inherited with slot_origin
daniel [Tue, 6 Mar 2018 14:42:43 +0000 (15:42 +0100)]
MCR: replace slot_inherited with slot_origin

Bug: T189004
Change-Id: Ie9dbda3296a71f584c82a5f275098adc225a53d5

3 years agoMerge "Rewrite passwordtoopopular message"
jenkins-bot [Mon, 19 Mar 2018 20:45:19 +0000 (20:45 +0000)]
Merge "Rewrite passwordtoopopular message"

3 years agoMerge "Pass revision being reverted to edit code"
jenkins-bot [Mon, 19 Mar 2018 20:43:51 +0000 (20:43 +0000)]
Merge "Pass revision being reverted to edit code"

3 years agoMerge "Add default for revision.rev_text_id where missing"
jenkins-bot [Mon, 19 Mar 2018 20:14:12 +0000 (20:14 +0000)]
Merge "Add default for revision.rev_text_id where missing"

3 years agoRewrite passwordtoopopular message
Framawiki [Mon, 19 Mar 2018 18:51:02 +0000 (19:51 +0100)]
Rewrite passwordtoopopular message

Bug: T177018
Change-Id: Ie0b6a6f26de0271935514fc0764d4894ef0975f4

3 years agoAdd default for revision.rev_text_id where missing
addshore [Mon, 12 Mar 2018 16:21:02 +0000 (16:21 +0000)]
Add default for revision.rev_text_id where missing

This adds a default of 0 for:
 - Mssql
 - Mysql
 - Sqlite

The field is already NULLable in:
 - Oracle
 - Postgres

Bug: T188741
Change-Id: Ibe1cc363d21fb96f38c263181bf30a429a1c7b45

3 years agoMerge "mediawiki.util: Document isIPAddress() allowBlock as optional"
jenkins-bot [Mon, 19 Mar 2018 06:45:19 +0000 (06:45 +0000)]
Merge "mediawiki.util: Document isIPAddress() allowBlock as optional"

3 years agoMerge "Fix WikiPageDbTestBase::testNewFromId_returnsNullOnNonExistingId"
jenkins-bot [Mon, 19 Mar 2018 03:54:13 +0000 (03:54 +0000)]
Merge "Fix WikiPageDbTestBase::testNewFromId_returnsNullOnNonExistingId"

3 years agomediawiki.util: Document isIPAddress() allowBlock as optional
Timo Tijhof [Mon, 19 Mar 2018 03:32:05 +0000 (20:32 -0700)]
mediawiki.util: Document isIPAddress() allowBlock as optional

This was already the case in the code, but the documentation
was not reflecting this accurately. Passing 'false' as second
parameter is not desirable in most cases.

Change-Id: Idbbd7de795b444e401a16292dfb8c9a80f4d07be

3 years agoMerge "Move image_comment_temp entries when the file is moved"
jenkins-bot [Mon, 19 Mar 2018 01:44:06 +0000 (01:44 +0000)]
Merge "Move image_comment_temp entries when the file is moved"

3 years agoMerge "Remove @dataProvider and @covers from non-test functions"
jenkins-bot [Sun, 18 Mar 2018 22:36:44 +0000 (22:36 +0000)]
Merge "Remove @dataProvider and @covers from non-test functions"

3 years agoMerge "Remove unused HashRing::newWithoutLocation() method"
jenkins-bot [Sun, 18 Mar 2018 22:24:09 +0000 (22:24 +0000)]
Merge "Remove unused HashRing::newWithoutLocation() method"

3 years agoRemove @dataProvider and @covers from non-test functions
Umherirrender [Fri, 16 Mar 2018 16:50:59 +0000 (17:50 +0100)]
Remove @dataProvider and @covers from non-test functions

Only functions beginning with test* should have that annotation

Change-Id: I85cd795970205943aebe692d85434145b3cf3f5b

3 years agoMerge "Set visiblity of some HashRing methods"
jenkins-bot [Sun, 18 Mar 2018 22:19:35 +0000 (22:19 +0000)]
Merge "Set visiblity of some HashRing methods"

3 years agoUse SPDX 3.0 license identifier
Kunal Mehta [Tue, 6 Mar 2018 01:14:07 +0000 (17:14 -0800)]
Use SPDX 3.0 license identifier

SPDX released version 3 of their license list (<https://spdx.org/licenses/>),
which changed the FSF licenses to explicitly end in -only or -or-later
instead of relying on an easy to miss + symbol.

Bug: T183858
Change-Id: I4cbb98ea2bbacf46a57401dbba2bdb076fca1d3a

3 years agoMove image_comment_temp entries when the file is moved
Brad Jorsch [Sun, 18 Mar 2018 15:37:05 +0000 (11:37 -0400)]
Move image_comment_temp entries when the file is moved

Bug: T189985
Change-Id: I437102d62cb94fd3195ff06ee8185ce5a2dc941e

3 years agoRemove unused HashRing::newWithoutLocation() method
Aaron Schulz [Sun, 18 Mar 2018 04:24:26 +0000 (21:24 -0700)]
Remove unused HashRing::newWithoutLocation() method

Change-Id: I6f149b2ef2e7e9fe2e7ddbda6c0c7d795c24720e

3 years agoSet visiblity of some HashRing methods
Aaron Schulz [Sun, 18 Mar 2018 04:22:56 +0000 (21:22 -0700)]
Set visiblity of some HashRing methods

* getLiveRing() is now protected
* getLocation() is now final

Change-Id: I16002fe7187d8bbb6e36d4dd9a1302ee1d46a4bb

3 years agoMerge "Normalize PHPDoc attributes"
jenkins-bot [Sun, 18 Mar 2018 05:19:04 +0000 (05:19 +0000)]
Merge "Normalize PHPDoc attributes"

3 years agoMerge "Don't use deprecated NS_IMAGE*"
jenkins-bot [Sun, 18 Mar 2018 05:16:24 +0000 (05:16 +0000)]
Merge "Don't use deprecated NS_IMAGE*"

3 years agoMerge "RevisionStore: Properly encode timestamp"
jenkins-bot [Sun, 18 Mar 2018 05:06:21 +0000 (05:06 +0000)]
Merge "RevisionStore: Properly encode timestamp"

3 years agoMerge "Remove internal use of deprecated $wgRequestTime"
jenkins-bot [Sun, 18 Mar 2018 04:58:06 +0000 (04:58 +0000)]
Merge "Remove internal use of deprecated $wgRequestTime"

3 years agoMerge "Remove @group from ParserTestRunner"
jenkins-bot [Sun, 18 Mar 2018 04:46:03 +0000 (04:46 +0000)]
Merge "Remove @group from ParserTestRunner"

3 years agoRemove internal use of deprecated $wgRequestTime
Kevin Israel [Fri, 12 Aug 2016 10:33:37 +0000 (06:33 -0400)]
Remove internal use of deprecated $wgRequestTime

* Use $_SERVER['REQUEST_TIME_FLOAT'] unconditionally in WebRequest.php
  and libs/Timing.php. WebStart.php was doing this already without issue.
  The key existst since PHP 5.4, for both Web and CLI (we require 5.5).

* In wfDebug() and wfReportTime(), use $_SERVER['REQUEST_TIME_FLOAT'] instead.

* In ApiFormatBase and MWDebug, use WebRequest::getElapsedTime() instead.

* In Maintenance.php, remove setting of $wgRequestTime.

* In rebuildFileCache.php, update mocking to $_SERVER['REQUEST_TIME_FLOAT']
  so that we avoid re-introducing bug T24852.

Change-Id: I1b647da2862f815029caa533b592ec8a05b33806

3 years agoMerge "Rename ApiTestCaseUpload"
jenkins-bot [Sun, 18 Mar 2018 04:06:05 +0000 (04:06 +0000)]
Merge "Rename ApiTestCaseUpload"

3 years agoMerge "Make IPTest::isNotIPAddress a test function"
jenkins-bot [Sun, 18 Mar 2018 03:58:51 +0000 (03:58 +0000)]
Merge "Make IPTest::isNotIPAddress a test function"

3 years agoFix WikiPageDbTestBase::testNewFromId_returnsNullOnNonExistingId
Brad Jorsch [Sun, 18 Mar 2018 02:02:13 +0000 (22:02 -0400)]
Fix WikiPageDbTestBase::testNewFromId_returnsNullOnNonExistingId

This test is passing an "integer" that is beyond what even 64-bit PHP
can properly represent as an integer, so it likely winds up passing it
as '7.3574757437438E+19' to the database. MySQL, being MySQL, doesn't
care much, but other DBs do.

Change it to 2**31-1 instead.

Change-Id: Ieba51f034eaa1c3eabb2ada6b1ce876beefd3bff

3 years agoRevisionStore: Properly encode timestamp
Brad Jorsch [Sun, 18 Mar 2018 01:41:45 +0000 (21:41 -0400)]
RevisionStore: Properly encode timestamp

Timestamps in database queries need to be passed through
IDatabase::timestamp().

Change-Id: I1c163d80b2111a78bb10de49fe06d61f02c21d07

3 years agordbms: make selectRowCount() use $var argument to exclude NULLs
Aaron Schulz [Thu, 15 Feb 2018 03:46:04 +0000 (19:46 -0800)]
rdbms: make selectRowCount() use $var argument to exclude NULLs

If the $var argument is provided, then it will make the resulting
count exclude rows where the value for that column is NULL.

Also add buildSelectSubquery() method and Subquery
wrapper class for use with select() for calculated tables.

Change-Id: I549d629af99afdf370602de095f7fba6d1546c37

3 years agoNormalize PHPDoc attributes
Max Semenik [Sat, 17 Mar 2018 05:30:19 +0000 (22:30 -0700)]
Normalize PHPDoc attributes

Change-Id: I83e686d099de0ff0aacda7e332972e1c7ee49f04

3 years agoDon't use deprecated NS_IMAGE*
Max Semenik [Sat, 17 Mar 2018 00:26:17 +0000 (17:26 -0700)]
Don't use deprecated NS_IMAGE*

Change-Id: I3df00c8e55a79baa3f3727daeea6c9441113aebc

3 years agoapi: Restore fractions for default siprop=dbreplag response
Timo Tijhof [Sat, 17 Mar 2018 02:51:26 +0000 (19:51 -0700)]
api: Restore fractions for default siprop=dbreplag response

Without this fix, the situation is that a query for 'siprop=dbreplag'
shows a db server with lag=0, while the siprop=dbreplag&sishowalldb=1
query shows the same server having non-zero lag. That's confusing.

Regression from r47865 (88f35cdf6e).

Change-Id: Id4854c8453206a6f1f8c369dc89c3a8bd910f83f

3 years agoMerge "Remove #toc and #toctitle style definitions"
jenkins-bot [Fri, 16 Mar 2018 23:09:41 +0000 (23:09 +0000)]
Merge "Remove #toc and #toctitle style definitions"

3 years agoRemove #toc and #toctitle style definitions
Derk-Jan Hartman [Tue, 20 Feb 2018 16:39:32 +0000 (17:39 +0100)]
Remove #toc and #toctitle style definitions

Styling by class is preferred over styling by id as a rule, and
this #toc .toc doubling up was in place since 2005.
(28c9a747797dae738cd6fe1a97c29e1591564112)

13 years of cache protection seems adequate :)

Bug: T187808
Change-Id: I7f3a9df7f9fd1178986112b5265b1ae7c991d5b7

3 years agoPass revision being reverted to edit code
Max Semenik [Fri, 16 Mar 2018 21:33:45 +0000 (14:33 -0700)]
Pass revision being reverted to edit code

Otherwise, PageContentSaveComplete hook users are unable to detect
reverts.

Bug: T189819
Change-Id: Ib1dc0c323a9a5083b462421c68575fc22ad4af35