lhc/web/wiklou.git
6 years agoobjectcache: various cleanups to WANObjectCache
Aaron Schulz [Fri, 1 Dec 2017 23:25:40 +0000 (15:25 -0800)]
objectcache: various cleanups to WANObjectCache

Change-Id: Ibc3c7e59b47b4f9b982176f81dff9f81d99de460

6 years agoMerge "objectcache: add example use case to WANObjectCache::getMultiCheckKeyTime()"
jenkins-bot [Fri, 1 Dec 2017 22:42:34 +0000 (22:42 +0000)]
Merge "objectcache: add example use case to WANObjectCache::getMultiCheckKeyTime()"

6 years agoMerge "objectcache: Fix HashBagOStuffTest test in PHP 7.1"
jenkins-bot [Fri, 1 Dec 2017 22:30:15 +0000 (22:30 +0000)]
Merge "objectcache: Fix HashBagOStuffTest test in PHP 7.1"

6 years agoobjectcache: add example use case to WANObjectCache::getMultiCheckKeyTime()
Aaron Schulz [Fri, 1 Dec 2017 05:54:17 +0000 (21:54 -0800)]
objectcache: add example use case to WANObjectCache::getMultiCheckKeyTime()

Change-Id: I874070d2f770be7f9e06c381b2413f6e133418b8

6 years agoMerge "objectcache: add WANObjectCache::getMultiCheckKeyTime method"
jenkins-bot [Fri, 1 Dec 2017 22:14:41 +0000 (22:14 +0000)]
Merge "objectcache: add WANObjectCache::getMultiCheckKeyTime method"

6 years agoMerge "build: Add PHP 7.1 to Travis CI test matrix"
jenkins-bot [Fri, 1 Dec 2017 21:46:46 +0000 (21:46 +0000)]
Merge "build: Add PHP 7.1 to Travis CI test matrix"

6 years agoobjectcache: add WANObjectCache::getMultiCheckKeyTime method
Aaron Schulz [Fri, 1 Dec 2017 04:38:07 +0000 (20:38 -0800)]
objectcache: add WANObjectCache::getMultiCheckKeyTime method

Change-Id: I5675fabc5aa70f72659ce02d68caae88be20e06d

6 years agobuild: Add PHP 7.1 to Travis CI test matrix
Timo Tijhof [Fri, 1 Dec 2017 21:37:22 +0000 (13:37 -0800)]
build: Add PHP 7.1 to Travis CI test matrix

Looks like we've got at least one test failure at the moment
(being fixed in Ibb1a59e373740772). Let's use Travis CI to also
check if there are other failures behind it.

Change-Id: Iec9857ee04b4811e912f2f43aed1e5a9fce0a2c4

6 years agoMerge "Changes for Mirandese (mwl)"
jenkins-bot [Fri, 1 Dec 2017 21:37:20 +0000 (21:37 +0000)]
Merge "Changes for Mirandese (mwl)"

6 years agoobjectcache: Fix HashBagOStuffTest test in PHP 7.1
Timo Tijhof [Fri, 1 Dec 2017 21:28:36 +0000 (13:28 -0800)]
objectcache: Fix HashBagOStuffTest test in PHP 7.1

> There was 1 error:
>
> 1) HashBagOStuffTest::testEvictionAdd
> A non-numeric value encountered
>
> tests/phpunit/includes/libs/objectcache/HashBagOStuffTest.php:106

This warning is new in PHP 7.1, however the behaviour is not new.
This code was already not behaving as it should have. Concatenation
preceeds addition/multiplication. As such, this was producing
(int)-10 each time instead of (str)"key0" through (str)"key10".

Change-Id: Ibb1a59e373740772f02dfec77ee7ebd9d181d852

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 1 Dec 2017 21:12:39 +0000 (22:12 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I67c7200d7062e685c0d3eac069f6faf70f745f25

6 years agoChanges for Mirandese (mwl)
MarcoAurelio [Tue, 21 Nov 2017 22:12:25 +0000 (22:12 +0000)]
Changes for Mirandese (mwl)

* Renamed ns:-2 and added previous name as alias for backwards
  compatibility.
* Renamed NS_TEMPLATE_TALK.
* Added "utilizador/utilizadora" as alias for NS_USER for backwards
  compatibility.
* NS_MEDIAWIKI added to avoid issues.
* Renamed NS_PROJECT_TALK and added old naming as alias for backwards
  compatibility.

Author: <https://www.mediawiki.org/wiki/User:Athena_in_Wonderland>.

Bug: T180052
Change-Id: I85431339bf24520063077db49d5e9f6b2666bc23

6 years agoRCFilters: Make 'days' and 'limit' sticky
Moriel Schottlender [Thu, 2 Nov 2017 23:15:36 +0000 (16:15 -0700)]
RCFilters: Make 'days' and 'limit' sticky

* Each has a hidden preference to override the preferences value
* Each value is different between Watchlist and RecentChanges
* rcfilters-limit is updated when rclimit is changed
* Not conditionally hiding the rcdays, watchlistdays and wllimit yet
  because hide-if's behavior is annoying

Bonus:
* Add a static method to check whether RCFilters UI is enabled
  and enabled by default. Adjust the call for Watchlist which
  checks a slightly different configuration setup.

Bug: T174415
Change-Id: Ib933de3a3f9e876924386e80f315506f60f8af54

6 years agoMerge "objectcache: Run preemptive WAN cache refreshes post-send"
jenkins-bot [Fri, 1 Dec 2017 19:08:30 +0000 (19:08 +0000)]
Merge "objectcache: Run preemptive WAN cache refreshes post-send"

6 years agoMerge "RCFilters: Ignore 'invert' model if there are no namespaces in saved queries"
jenkins-bot [Fri, 1 Dec 2017 12:14:44 +0000 (12:14 +0000)]
Merge "RCFilters: Ignore 'invert' model if there are no namespaces in saved queries"

6 years agoMerge "objectcache: fix a few documentation mistakes"
jenkins-bot [Fri, 1 Dec 2017 10:06:10 +0000 (10:06 +0000)]
Merge "objectcache: fix a few documentation mistakes"

6 years agoMerge "Cleanup WikiPageTest"
jenkins-bot [Fri, 1 Dec 2017 10:04:19 +0000 (10:04 +0000)]
Merge "Cleanup WikiPageTest"

6 years agoobjectcache: Run preemptive WAN cache refreshes post-send
Aaron Schulz [Sat, 18 Nov 2017 20:18:01 +0000 (12:18 -0800)]
objectcache: Run preemptive WAN cache refreshes post-send

This keeps HTTP request time consistent in case of expensive keys

Change-Id: I0746fde29a6e2f27d1b92f1af599c741d5972f46

6 years agoobjectcache: fix a few documentation mistakes
Aaron Schulz [Fri, 1 Dec 2017 06:07:09 +0000 (22:07 -0800)]
objectcache: fix a few documentation mistakes

* Fix useInterimHoldOffCaching() description
* Mention when staleTTL and graceTTL where added

Change-Id: Iea24b77f6816251e9dac814dc57f6a44382a3cea

6 years agoMerge "objectcache: Add @ingroup to RedisBagOStuff"
jenkins-bot [Fri, 1 Dec 2017 06:02:13 +0000 (06:02 +0000)]
Merge "objectcache: Add @ingroup to RedisBagOStuff"

6 years agoMerge "Use ParserOutput stateless transforms"
jenkins-bot [Fri, 1 Dec 2017 04:20:33 +0000 (04:20 +0000)]
Merge "Use ParserOutput stateless transforms"

6 years agoMerge "ParserOutput: Add stateless transforms to getText()"
jenkins-bot [Fri, 1 Dec 2017 04:16:07 +0000 (04:16 +0000)]
Merge "ParserOutput: Add stateless transforms to getText()"

6 years agoRCFilters: Ignore 'invert' model if there are no namespaces in saved queries
Moriel Schottlender [Sat, 18 Nov 2017 01:43:37 +0000 (17:43 -0800)]
RCFilters: Ignore 'invert' model if there are no namespaces in saved queries

When comparing and when saving the query, normalize the 'invert'
state so that it represents the **effective** state of the filters.
If there are no namespaces, then 'invert' is irrelevant.

Make sure we ignore that state when it is irrelevant when we save
saved queries and when we compare the current state to a saved query.

Change-Id: If80b50c3d2b90b5116b6b0018a8d56bce2deb7c4

6 years agoMerge "Title: Use a more proper way of detecting whether interwikis are local"
jenkins-bot [Fri, 1 Dec 2017 00:05:04 +0000 (00:05 +0000)]
Merge "Title: Use a more proper way of detecting whether interwikis are local"

6 years agoMerge "objectcache: Make WANObjectCache interim caching not interfere with Chronology...
jenkins-bot [Fri, 1 Dec 2017 00:04:23 +0000 (00:04 +0000)]
Merge "objectcache: Make WANObjectCache interim caching not interfere with ChronologyProtector"

6 years agoobjectcache: Make WANObjectCache interim caching not interfere with ChronologyProtector
Aaron Schulz [Wed, 29 Nov 2017 04:39:47 +0000 (20:39 -0800)]
objectcache: Make WANObjectCache interim caching not interfere with ChronologyProtector

Also removed useless line from testLockTSE(). That would have needed
to be using $this->internalCache and those locks are freed immediately.

Bug: T180035
Change-Id: Ida1a923f779aaf8410da76643457d2200da6cb20

6 years agoMerge "Remove @defgroup from DefaultSettings.php"
jenkins-bot [Thu, 30 Nov 2017 23:52:44 +0000 (23:52 +0000)]
Merge "Remove @defgroup from DefaultSettings.php"

6 years agoobjectcache: Add @ingroup to RedisBagOStuff
Timo Tijhof [Thu, 30 Nov 2017 23:51:26 +0000 (15:51 -0800)]
objectcache: Add @ingroup to RedisBagOStuff

Was missing from "Cache" group, as well as from the cross-component
"Redis" group.

Change-Id: I52ebc93cf472a4acc383742e0ea5c15c5a6db537

6 years agoRemove @defgroup from DefaultSettings.php
Timo Tijhof [Thu, 30 Nov 2017 23:43:28 +0000 (15:43 -0800)]
Remove @defgroup from DefaultSettings.php

This renders in Doxygen as a blank page in the "Modules" sidebar,
doesn't seem to serve any purpose.

No mentions of "Globalsettings" or "Global settings" elsewhere
in the repository.

Change-Id: I2c03b4190c899f2acff400d63bbd3df09f8d49d1

6 years agoRemove some dumb headers with my name in it
Chad Horohoe [Thu, 30 Nov 2017 23:39:41 +0000 (15:39 -0800)]
Remove some dumb headers with my name in it

Change-Id: Ib34b623b47fb92f1383bc5c55c50a16dd6d49abd

6 years agoMerge "resourceloader: Remove deprecated minifier config vars"
jenkins-bot [Thu, 30 Nov 2017 23:32:51 +0000 (23:32 +0000)]
Merge "resourceloader: Remove deprecated minifier config vars"

6 years agoTitle: Use a more proper way of detecting whether interwikis are local
Max Semenik [Tue, 28 Nov 2017 23:17:46 +0000 (15:17 -0800)]
Title: Use a more proper way of detecting whether interwikis are local

Bug: T181575
Change-Id: Ifcfe609ce01b174120b81b8c0bf82c4ed6077641

6 years agoMerge "Make ChronologyProtector actually use cpPosTime cookies"
jenkins-bot [Thu, 30 Nov 2017 23:30:54 +0000 (23:30 +0000)]
Merge "Make ChronologyProtector actually use cpPosTime cookies"

6 years agoresourceloader: Remove deprecated minifier config vars
Timo Tijhof [Thu, 30 Nov 2017 23:19:10 +0000 (15:19 -0800)]
resourceloader: Remove deprecated minifier config vars

Unused, their values have been hard-coded since 1.27.
No uses anywhere in Wikimedia Git, besides their definition
in this file.

Change-Id: I6689274d0ad028e2c468560816ab753b345048e9

6 years agoMerge "Fix phpdoc for Category::newFromName"
jenkins-bot [Thu, 30 Nov 2017 23:19:34 +0000 (23:19 +0000)]
Merge "Fix phpdoc for Category::newFromName"

6 years agoMerge "WatchedItemStoreUnitTest return strings in db mocks"
jenkins-bot [Thu, 30 Nov 2017 23:16:08 +0000 (23:16 +0000)]
Merge "WatchedItemStoreUnitTest return strings in db mocks"

6 years agoMerge "Add missing @throw tags to IDatabase/Database"
jenkins-bot [Thu, 30 Nov 2017 22:44:38 +0000 (22:44 +0000)]
Merge "Add missing @throw tags to IDatabase/Database"

6 years agoMerge "Use parent function in mysql DB class in getWeightScale()"
jenkins-bot [Thu, 30 Nov 2017 22:28:42 +0000 (22:28 +0000)]
Merge "Use parent function in mysql DB class in getWeightScale()"

6 years agoMake ChronologyProtector actually use cpPosTime cookies
Aaron Schulz [Wed, 29 Nov 2017 02:40:04 +0000 (18:40 -0800)]
Make ChronologyProtector actually use cpPosTime cookies

Setup.php was only injected the value from $_GET. LBFactory used
to check both before 0e5cd18b74d83c50, with the cookie check left
in LBFactoryMW. After d175b391ae2a7, LBFactoryMW class switched to
the default LBFactory method for making a ChronologyProtector
instance, so the cookie check was lost there too.

This means that an HTTP GET request due to a redirect from a POST
request will still make sure the DB position store is up-to-date.
This only matters is that store uses replication (e.g. cross DC).

Also refactor LBFactory handling of the cpPosTime URL parameter.

Change-Id: Ie5744577609f4c193cacd71334f92b30f02e3846

6 years agoAdd missing @throw tags to IDatabase/Database
Aaron Schulz [Thu, 30 Nov 2017 22:03:38 +0000 (14:03 -0800)]
Add missing @throw tags to IDatabase/Database

Change-Id: I235c5beacce38e9121fb1db94ce410d010356fcf

6 years agoUse parent function in mysql DB class in getWeightScale()
Aaron Schulz [Thu, 30 Nov 2017 22:10:23 +0000 (14:10 -0800)]
Use parent function in mysql DB class in getWeightScale()

May as well keep this case in sync with the base class

Change-Id: I4c62c3247ec3372c6a274b889fac1b7a883f5cf5

6 years agoMerge "jobs: Remove ClearUserWatchlistJob 'batchSize' option"
jenkins-bot [Thu, 30 Nov 2017 21:46:18 +0000 (21:46 +0000)]
Merge "jobs: Remove ClearUserWatchlistJob 'batchSize' option"

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 30 Nov 2017 21:44:56 +0000 (22:44 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: Idd9b2d5c55e485a3d30473323ee224b628c0e83b

6 years agojobs: Remove ClearUserWatchlistJob 'batchSize' option
Timo Tijhof [Thu, 30 Nov 2017 20:36:36 +0000 (12:36 -0800)]
jobs: Remove ClearUserWatchlistJob 'batchSize' option

Use $wgUpdateRowsPerQuery instead, and use its value at run-time
instead of inside the job parameters. Also helps with deduplication
if batchSize is changed.

Change-Id: Ifef25a3ae5ae2418359a41eba05778613fbb548f

6 years agoMerge "RCFilters: Followup I75cfb2b56a: Fix function declaration"
jenkins-bot [Thu, 30 Nov 2017 19:48:03 +0000 (19:48 +0000)]
Merge "RCFilters: Followup I75cfb2b56a: Fix function declaration"

6 years agoUse ParserOutput stateless transforms
Brad Jorsch [Wed, 22 Nov 2017 20:07:51 +0000 (15:07 -0500)]
Use ParserOutput stateless transforms

We still set the state in many cases for benefit of extensions, but all
calls within core should no longer be using non-default state.

Change-Id: I78b62ec33fcb8273acb9b3b4e9012215442be94c
Depends-On: I140ff32373430b61b92226689ef9b58cca317450

6 years agoParserOutput: Add stateless transforms to getText()
Brad Jorsch [Wed, 22 Nov 2017 18:12:23 +0000 (13:12 -0500)]
ParserOutput: Add stateless transforms to getText()

The stateful transforms are deprecated.

Inspired by Krinkle's If2fb32fc.

Bug: T171797
Change-Id: Ied5fe1a6159c2d4fa48170042b44d735ce7b6f9b

6 years agoCleanup WikiPageTest
addshore [Mon, 27 Nov 2017 13:49:04 +0000 (13:49 +0000)]
Cleanup WikiPageTest

Change-Id: Id95b7153c42ddcd391f966b75f54e00c13d7ce5a

6 years agoRCFilters: Followup I75cfb2b56a: Fix function declaration
Moriel Schottlender [Thu, 30 Nov 2017 19:10:43 +0000 (11:10 -0800)]
RCFilters: Followup I75cfb2b56a: Fix function declaration

Bug: T181671
Change-Id: Ie69e9f0f77b2c463bc2e4d41cd9a1b8e87f7efef

6 years agoMerge "Combine changes limit and time period selectors"
jenkins-bot [Thu, 30 Nov 2017 19:11:03 +0000 (19:11 +0000)]
Merge "Combine changes limit and time period selectors"

6 years agoMerge "Add new core tags"
jenkins-bot [Thu, 30 Nov 2017 18:43:28 +0000 (18:43 +0000)]
Merge "Add new core tags"

6 years agoAdd new core tags
petarpetkovic [Thu, 9 Nov 2017 11:13:16 +0000 (12:13 +0100)]
Add new core tags

Add tags to types of edits that get automatic edit summaries:
- Making a page a redirect
- Changing redirect target
- Changing an existing redirect into a non-redirect
- Blanking of the page
- Removing nearly all (more than 90%) content
- Rolling back an edit

Bug: T167656
Bug: T73236
Change-Id: Ie7f637fcec5ee659c1086e28e8ba21f470c45160

6 years agoFix phpdoc for Category::newFromName
addshore [Thu, 30 Nov 2017 18:23:48 +0000 (19:23 +0100)]
Fix phpdoc for Category::newFromName

Change-Id: I78e18b41acda9aa143360a49fd161b8af1d218be

6 years agoWarn for uploads with new name but same content as local file
Cormac Parle [Thu, 30 Nov 2017 17:29:36 +0000 (17:29 +0000)]
Warn for uploads with new name but same content as local file

Previously warnings about the sha1 of an uploaded file being
the same as an existing file were stripped if the existing
file was in local storage - this was to avoid duplicate
warnings if a file with the same name had already been found
and had the same content. Now the warning is only stripped
for local files with the same name as the uploaded file.

Bug: T180691
Change-Id: I455df30085c05320dca976b9f7f8fb711a083271

6 years agoHTMLMultiSelectField: Allow formatting in section headings in OOUI mode
Bartosz Dziewoński [Thu, 30 Nov 2017 16:38:30 +0000 (17:38 +0100)]
HTMLMultiSelectField: Allow formatting in section headings in OOUI mode

Follow-up to 5a113417e5af9d0d0dbed63429649a9780784d45.
It is allowed in non-OOUI modes.

Bug: T181698
Change-Id: Ib2ebcd1a92f1b02a528787fe3fd1f5452b9808c4

6 years agoWatchedItemStoreUnitTest return strings in db mocks
addshore [Thu, 30 Nov 2017 16:12:59 +0000 (17:12 +0100)]
WatchedItemStoreUnitTest return strings in db mocks

Change-Id: Ib74acd0e2e3a9fd94ca1b9bc06529852f770d0d1

6 years agoFix timestamps in ImportTest
Brad Jorsch [Thu, 30 Nov 2017 15:37:16 +0000 (10:37 -0500)]
Fix timestamps in ImportTest

They need to be passed through $db->timestamp().

Bug: T75174
Change-Id: I94ff961ae27220bcf15eda201677159f6c2d38ef

6 years agoConvert timestamp from DB in RevisionDbTestBase::testInsertOn
addshore [Thu, 30 Nov 2017 13:49:17 +0000 (14:49 +0100)]
Convert timestamp from DB in RevisionDbTestBase::testInsertOn

Bug: T75174
Change-Id: Ia45eec0e072c794931ea7a415259602d03f4c31e

6 years agoMerge "Add wfWaitForSlaves() to maintenance/migrateComments.php"
jenkins-bot [Thu, 30 Nov 2017 04:30:41 +0000 (04:30 +0000)]
Merge "Add wfWaitForSlaves() to maintenance/migrateComments.php"

6 years agoMerge "Database: Fix degenerate parenthesized joins"
jenkins-bot [Thu, 30 Nov 2017 04:30:28 +0000 (04:30 +0000)]
Merge "Database: Fix degenerate parenthesized joins"

6 years agoAvoid DB rows with usable names but ID = 0 by introducing "interwiki" usernames
Brad Jorsch [Wed, 25 Oct 2017 19:26:53 +0000 (15:26 -0400)]
Avoid DB rows with usable names but ID = 0 by introducing "interwiki" usernames

Importing revisions in MediaWiki has long been weird: if the username on
the imported revision exists locally it's automatically attributed to
the local user, while if the name does not exist locally we wind up with
revision table rows with rev_user = 0 and rev_user_text being a valid
name that someone might later create. "Global" blocks too create rows
with ipb_by = 0 an ipb_by_text being a valid name.

The upcoming actor table change, as things currently stand, would
regularize that a bit by automatically attributing those imported
revisions to the newly-created user. But that's not necessarily what we
actually want to happen. And it would certainly confuse CentralAuth's
attempt to detect its own global blocks.

Thus, this patch introduces "interwiki" usernames that aren't valid for
local use, of the format "iw>Example".[1] Linker will interpret these
names and generate an appropriate interwiki link in history pages and
the like, as if from wikitext like `[[iw:User:Example]]`.

Imports for non-existant local users (and optionally for existing local
users too) will credit the edit to such an interwiki name. There is also
a new hook, 'ImportHandleUnknownUser', to allow extension such as
CentralAuth to create local users as their edits are imported.

Block will no longer accept usable-but-nonexistent names for 'byText' or
->setBlocker(). CentralAuth's global blocks will be submitted with an
interwiki username (see Ieae5d24f9).

Wikis that have imported edits or CentralAuth global blocks should run
the new maintenance/cleanupUsersWithNoId.php maintenance script. This
isn't done by update.php because (1) it needs an interwiki prefix to use
and (2) the updater can't know whether to pass the `--assign` flag.

[1]: '>' was used instead of the more usual ':' because WMF wikis have
many existing usernames containing colons.

Bug: T9240
Bug: T20209
Bug: T111605
Change-Id: I5401941c06102e8faa813910519d55482dff36cb
Depends-On: Ieae5d24f9098c1977447c50a8d4e2cab58a24d9f

6 years agoAdded new success message when CLI Installer completes its work succesfuly.
Antoni Siek [Wed, 29 Nov 2017 20:42:39 +0000 (21:42 +0100)]
Added new success message when CLI Installer completes its work succesfuly.

Bug: T181468
Change-Id: Iddce5d0e1244ff1e4740fdaf1b07023355c62f27

6 years agoMerge "Add wfDeprecated() call to MimeMagic::singleton()"
jenkins-bot [Wed, 29 Nov 2017 22:43:07 +0000 (22:43 +0000)]
Merge "Add wfDeprecated() call to MimeMagic::singleton()"

6 years agoMerge "WebStart: Remove use of realpath() for $IP"
jenkins-bot [Wed, 29 Nov 2017 22:40:46 +0000 (22:40 +0000)]
Merge "WebStart: Remove use of realpath() for $IP"

6 years agoMerge "s/Latn/latn/"
jenkins-bot [Wed, 29 Nov 2017 22:34:32 +0000 (22:34 +0000)]
Merge "s/Latn/latn/"

6 years agoMerge "Shell: skip null parameters"
jenkins-bot [Wed, 29 Nov 2017 22:17:19 +0000 (22:17 +0000)]
Merge "Shell: skip null parameters"

6 years agoMerge "Disallow setting DBO_IGNORE in Database for sanity"
jenkins-bot [Wed, 29 Nov 2017 21:54:15 +0000 (21:54 +0000)]
Merge "Disallow setting DBO_IGNORE in Database for sanity"

6 years agos/Latn/latn/
Reedy [Wed, 29 Nov 2017 21:28:37 +0000 (21:28 +0000)]
s/Latn/latn/

Follows-up I7f89569c6ee6640d368af1378e84c5a9e725dad0

Change-Id: I7600ebe27cfc8c8d892c8169a6f59e934e5eec08

6 years agoWebStart: Remove use of realpath() for $IP
Timo Tijhof [Tue, 28 Nov 2017 04:46:38 +0000 (20:46 -0800)]
WebStart: Remove use of realpath() for $IP

When installing MediaWiki in a sub directory of document root,
and including it from an /index.php file in the document root,
MediaWiki succesfully includes WebStart from index.php, but
WebStart.php fails to include Setup.php.

For example, MediaWiki installation at /var/www/mediawiki with the
following file at /var/www/index.php.

```
<?php
require __DIR__ . '/mediawiki/index.php';
```

Failure:

> Fatal error:
> require_once(): Failed opening required '/var/www/includes/Setup.php'
> (include_path='.:/usr/local/lib/php') in
> /var/www/mediawiki/includes/WebStart.php on line 97
>
> Stack trace:
>   1. {main}() /var/www/index.php:0
>   2. require() /var/www/index.php:3
>   3. require() /var/www/mediawiki/index.php:40

Bug: T153882
Change-Id: Icd8cfa580ce1c22bc3bf177570a9f4a940d2427c

6 years agoMerge "objectcache: use INTERIM_KEY_TTL constant in WANObjectCache for readability"
jenkins-bot [Wed, 29 Nov 2017 21:37:03 +0000 (21:37 +0000)]
Merge "objectcache: use INTERIM_KEY_TTL constant in WANObjectCache for readability"

6 years agoDisallow setting DBO_IGNORE in Database for sanity
Aaron Schulz [Thu, 23 Nov 2017 10:17:14 +0000 (02:17 -0800)]
Disallow setting DBO_IGNORE in Database for sanity

In the off chance something called this, it would break all
sorts of code that expects that either query result functions
either succeed or throw an error.

Callers are not expected to have to check if the result of
a query is meaningful or false due to an error.

Change-Id: I0b4fe1403f55a399ffd40817ed12f857087d6f83

6 years agoMerge "Add ip_changes to postgres/tables.sql"
jenkins-bot [Wed, 29 Nov 2017 21:29:22 +0000 (21:29 +0000)]
Merge "Add ip_changes to postgres/tables.sql"

6 years agoAdd ip_changes to postgres/tables.sql
Reedy [Wed, 29 Nov 2017 21:02:22 +0000 (21:02 +0000)]
Add ip_changes to postgres/tables.sql

Follow-up Ic11c64813ee04e8520771bfa156f8e51404273e7

Bug: T177258
Change-Id: I69a278c1928ed91ef5cbe5b66e590eef629a2981

6 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 29 Nov 2017 21:07:55 +0000 (22:07 +0100)]
Localisation updates from https://translatewiki.net.

Change-Id: I71dd8b5115cb4c4db79542b25e00f0cbea8a1275

6 years agoMerge "Remove DEFAULT '' from postgres ip_changes.ipc_rev_timestamp"
jenkins-bot [Wed, 29 Nov 2017 21:03:43 +0000 (21:03 +0000)]
Merge "Remove DEFAULT '' from postgres ip_changes.ipc_rev_timestamp"

6 years agoMerge "Increase Opera minimum for Grades A and C to 15"
jenkins-bot [Wed, 29 Nov 2017 20:54:00 +0000 (20:54 +0000)]
Merge "Increase Opera minimum for Grades A and C to 15"

6 years agoMerge "Remove moment.js bump from 1.31 release notes"
jenkins-bot [Wed, 29 Nov 2017 20:46:09 +0000 (20:46 +0000)]
Merge "Remove moment.js bump from 1.31 release notes"

6 years agoDatabase: Fix degenerate parenthesized joins
Brad Jorsch [Wed, 29 Nov 2017 20:42:27 +0000 (15:42 -0500)]
Database: Fix degenerate parenthesized joins

The SQL standard supports parenthesized joins like

    a JOIN (b JOIN c ON (...)) ON (...)

But it doesn't support parenthesizing a single table name, i.e. a
one-table "join", like

    a JOIN (b) ON (...)

Detect the degenerate single-table case and omit the parentheses.

Bug: T181674
Change-Id: I82cacd80465092aa67ff19bdcfd6682001bf12ab

6 years agoShell: skip null parameters
Max Semenik [Wed, 29 Nov 2017 02:51:25 +0000 (18:51 -0800)]
Shell: skip null parameters

Right now they're treated as empty strings, however
this doesn't allow skipping parameters in the middle like
 $params = [
     'foo',
     $x ? '--bar' : null,
     '--baz',
 ];

In some cases this matters, e.g. `ls` works while `ls ''` doesn't.

Also, fix spacing problems the new tests uncovered:
* Extra space when using params()
* Missing space when combining params() and unsafeParams()

Change-Id: Icb29d4c48ae7f92fb5635e3865346c98f47abb01

6 years agoMerge "mw.notifiction: Bring in some rules from Vector"
jenkins-bot [Wed, 29 Nov 2017 20:20:53 +0000 (20:20 +0000)]
Merge "mw.notifiction: Bring in some rules from Vector"

6 years agoRemove moment.js bump from 1.31 release notes
Reedy [Wed, 29 Nov 2017 20:19:27 +0000 (20:19 +0000)]
Remove moment.js bump from 1.31 release notes

Going to be backported to 1.30

Follows-up I7f89569c6ee6640d368af1378e84c5a9e725dad0

Change-Id: I691f5e0cf1f4685f8d1ff55a7ff76a1ad2587d89

6 years agoMerge "resources: Bump moment.js from 2.15.0 to 2.19.3"
jenkins-bot [Wed, 29 Nov 2017 20:13:19 +0000 (20:13 +0000)]
Merge "resources: Bump moment.js from 2.15.0 to 2.19.3"

6 years agoRemove DEFAULT '' from postgres ip_changes.ipc_rev_timestamp
Reedy [Wed, 29 Nov 2017 20:11:19 +0000 (20:11 +0000)]
Remove DEFAULT '' from postgres ip_changes.ipc_rev_timestamp

Follows-up Ic11c64813ee04e8520771bfa156f8e51404273e7

Bug: T181672
Change-Id: I58fe5edb1e7656773271634f702ed044c6036497

6 years agoresources: Bump moment.js from 2.15.0 to 2.19.3
James D. Forrester [Wed, 29 Nov 2017 18:49:56 +0000 (10:49 -0800)]
resources: Bump moment.js from 2.15.0 to 2.19.3

Languages and locales now with support:
* bm
* de-ch
* gom-latn
* gu
* kn
* sd
* tet
* ur
* uz-latn
* yo

Skipped languages because we don't support them in MW:
* ar-dz
* ar-kw
* ar-ly
* en-ie
* en-nz
* es-do
* es-us
* fr-ch
* me
* nl-be
* tlh
* tzl

Also drop 'x-pseudo' which was included but not used.

Bug: T161732
Bug: T181547
Change-Id: I7f89569c6ee6640d368af1378e84c5a9e725dad0

6 years agoAdd wfWaitForSlaves() to maintenance/migrateComments.php
Brad Jorsch [Wed, 29 Nov 2017 19:52:31 +0000 (14:52 -0500)]
Add wfWaitForSlaves() to maintenance/migrateComments.php

Change-Id: Idb8d21116a52c473cc4658883fe13855bad92222

6 years agoMerge "Align other review tools and saved filters buttons"
jenkins-bot [Wed, 29 Nov 2017 19:28:02 +0000 (19:28 +0000)]
Merge "Align other review tools and saved filters buttons"

6 years agoMerge "Allow disabling exact input query in results in mw.widget.TitleWidget"
jenkins-bot [Wed, 29 Nov 2017 19:24:31 +0000 (19:24 +0000)]
Merge "Allow disabling exact input query in results in mw.widget.TitleWidget"

6 years agoMerge "Small change to "Other review tools" link"
jenkins-bot [Wed, 29 Nov 2017 19:18:14 +0000 (19:18 +0000)]
Merge "Small change to "Other review tools" link"

6 years agoAllow disabling exact input query in results in mw.widget.TitleWidget
petarpetkovic [Fri, 24 Nov 2017 14:14:15 +0000 (15:14 +0100)]
Allow disabling exact input query in results in mw.widget.TitleWidget

* Add configuration option to mw.widget.TitleWidget, to make
addition of exact input query to the results optional.

Change-Id: Ic7a3aaf38a3827917e4d349cc6b828f37cc64b67

6 years agoMerge "mediawiki.special.apisandbox.js: Apply JavaScript coding conventions"
jenkins-bot [Wed, 29 Nov 2017 19:04:21 +0000 (19:04 +0000)]
Merge "mediawiki.special.apisandbox.js: Apply JavaScript coding conventions"

6 years agomw.debug: Avoid overlap between debug toolbar and OOUI dropdowns
Bartosz Dziewoński [Wed, 29 Nov 2017 16:25:57 +0000 (17:25 +0100)]
mw.debug: Avoid overlap between debug toolbar and OOUI dropdowns

Bug: T106095
Change-Id: Ia519205852324899430ac7a769ee7e81ed80c37f

6 years agomw.notifiction: Bring in some rules from Vector
Ed Sanders [Wed, 29 Nov 2017 15:53:11 +0000 (15:53 +0000)]
mw.notifiction: Bring in some rules from Vector

The larger padding makes sense as a default. Also increase
the specificity of the error/warn rules so they are overridden
by changes to the default state.

Change-Id: I157e41631c4a09842b869215b0d6dbb99c1a4d36

6 years agoMerge "Revert "Hide empty OOUI FieldsetLayout headers""
jenkins-bot [Wed, 29 Nov 2017 13:47:56 +0000 (13:47 +0000)]
Merge "Revert "Hide empty OOUI FieldsetLayout headers""

6 years agoMerge "Swap german alias order for img_thumbnail and img_manualthumb"
jenkins-bot [Wed, 29 Nov 2017 12:46:11 +0000 (12:46 +0000)]
Merge "Swap german alias order for img_thumbnail and img_manualthumb"

6 years agoobjectcache: use INTERIM_KEY_TTL constant in WANObjectCache for readability
Aaron Schulz [Wed, 29 Nov 2017 05:59:28 +0000 (21:59 -0800)]
objectcache: use INTERIM_KEY_TTL constant in WANObjectCache for readability

Change-Id: I13936397def11a13849fe14491b752dd797f6759

6 years agoIncrease Opera minimum for Grades A and C to 15
James D. Forrester [Mon, 27 Nov 2017 20:39:17 +0000 (12:39 -0800)]
Increase Opera minimum for Grades A and C to 15

This drops into Grade X the Opera versions 12.10+ from Grade A,
and versions 10.x from Grade C.

Bug: T121517
Change-Id: Ie4df9c751bd0250581cd2e25cf1b38e69e67e82f

6 years agoAdd SQL for postgres, and fail gracefully in populateIpChanges
MusikAnimal [Mon, 13 Nov 2017 18:52:55 +0000 (13:52 -0500)]
Add SQL for postgres, and fail gracefully in populateIpChanges

If the ip_changes table doesn't exist, the populateIpChanges maintenance
script will fail gracefully, throwing a descriptive error.

The postgres SQL is untested.

Bug: T177258
Change-Id: Ic11c64813ee04e8520771bfa156f8e51404273e7

6 years agoMerge "Fix undefined $db"
jenkins-bot [Wed, 29 Nov 2017 00:51:15 +0000 (00:51 +0000)]
Merge "Fix undefined $db"

6 years agoFix undefined $db
Reedy [Wed, 29 Nov 2017 00:21:59 +0000 (00:21 +0000)]
Fix undefined $db

Bug: T181565
Change-Id: I286374d4ca0ab9435d7d54c4f8b9660a60e5f1e3

6 years agoRevert "Hide empty OOUI FieldsetLayout headers"
Bartosz Dziewoński [Thu, 16 Nov 2017 10:12:57 +0000 (10:12 +0000)]
Revert "Hide empty OOUI FieldsetLayout headers"

No longer needed after I79fe95e32272f013a1ce4e48a811fa9fbb53f4e6
(released in OOUI 0.24.3).

This reverts commit 382e366196b2b9aa7eb08c92776e6f716f8f5d65.

Depends-On: Ifdd44ead7d782288aaef0979322f0943f7304835
Change-Id: I37747b4b68801caf442b77e747f486053f279853