lhc/web/wiklou.git
5 years agoMerge "Don't throw E_NOTICEs about undefined properties"
jenkins-bot [Sat, 14 Jul 2018 22:31:22 +0000 (22:31 +0000)]
Merge "Don't throw E_NOTICEs about undefined properties"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 14 Jul 2018 20:00:57 +0000 (22:00 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I4fb9db02edc442a1b98b6e88d4715ba7f77dc402

5 years agoConvert PasswordReset to using MapCacheLRU
Aaron Schulz [Wed, 11 Jul 2018 13:08:08 +0000 (14:08 +0100)]
Convert PasswordReset to using MapCacheLRU

Avoid NULL user name that caused test failures

Change-Id: Ifc3b19cc7e172300123e7d2c7153b4357917ca74

5 years agoMerge "Mention MariaDB first, before MySQL in installer."
jenkins-bot [Sat, 14 Jul 2018 00:40:15 +0000 (00:40 +0000)]
Merge "Mention MariaDB first, before MySQL in installer."

5 years agoMerge "Accept BCP 47 codes as aliases for nonstandard variants"
jenkins-bot [Sat, 14 Jul 2018 00:30:44 +0000 (00:30 +0000)]
Merge "Accept BCP 47 codes as aliases for nonstandard variants"

5 years agoMerge "tests: Add a doc test for release notes' existence and line length"
jenkins-bot [Sat, 14 Jul 2018 00:27:22 +0000 (00:27 +0000)]
Merge "tests: Add a doc test for release notes' existence and line length"

5 years agoMerge "Follow-up 267d99fa8: Fix RELEASE-NOTES-1.32 line length"
jenkins-bot [Sat, 14 Jul 2018 00:17:30 +0000 (00:17 +0000)]
Merge "Follow-up 267d99fa8: Fix RELEASE-NOTES-1.32 line length"

5 years agotests: Add a doc test for release notes' existence and line length
James D. Forrester [Tue, 3 Jul 2018 22:22:09 +0000 (15:22 -0700)]
tests: Add a doc test for release notes' existence and line length

Change-Id: I502bedc0221e52b78b15b1749918500842533e7c

5 years agoAccept BCP 47 codes as aliases for nonstandard variants
C. Scott Ananian [Tue, 3 Jul 2018 20:12:38 +0000 (16:12 -0400)]
Accept BCP 47 codes as aliases for nonstandard variants

The browser Accept-Language header uses BCP 47 codes, which don't
precisely match our internal mediawiki variant names in a number of
places.  Allow proper BCP 47 codes to alias our internal variants
for: Accept-Language parsing, URL parsing, user preferences, and
explicit enumeration of codes in LanguageConverter rules.

Change-Id: I8468a56d5b88f5786abd0a17b67bda2f1687fd0c

5 years agoHard deprecate support for Parsoid v1 API
C. Scott Ananian [Fri, 13 Jul 2018 20:59:57 +0000 (16:59 -0400)]
Hard deprecate support for Parsoid v1 API

This was soft deprecated by f5c874cbaf2c1408342305fbc87dc6db36728e07 in
May 2015, and support for the v1 API was removed from Parsoid in May 2016,
but the compatibility code has persisted zombie-like in core.

Hard deprecate this now, to warn anyone who might still be using ancient
copies of Visual Editor and Parsoid, and then we can slice the code out
in the next MW release.

Bug: T100681
Change-Id: I68e0ab5b38f31b7708ba6f075dcb3328dde118d1

5 years agoMerge "Revert "Pedantic strict equals.""
jenkins-bot [Fri, 13 Jul 2018 20:45:38 +0000 (20:45 +0000)]
Merge "Revert "Pedantic strict equals.""

5 years agoMerge "Use func_num_args() in MapCacheLRU::clear() for sanity"
jenkins-bot [Fri, 13 Jul 2018 20:29:11 +0000 (20:29 +0000)]
Merge "Use func_num_args() in MapCacheLRU::clear() for sanity"

5 years agoMerge "Hard-deprecate ContentHandler::makeParserOptions()"
jenkins-bot [Fri, 13 Jul 2018 20:00:56 +0000 (20:00 +0000)]
Merge "Hard-deprecate ContentHandler::makeParserOptions()"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 13 Jul 2018 19:58:19 +0000 (21:58 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ibd2a95b4ebde7420a23dabbc3b8cdcfb12aa1452

5 years agoMerge "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"
jenkins-bot [Fri, 13 Jul 2018 19:28:25 +0000 (19:28 +0000)]
Merge "Ensure LanguageCode::bcp47() returns a valid BCP 47 language code"

5 years agoRevert "Pedantic strict equals."
Daniel Kinzler [Fri, 13 Jul 2018 19:27:02 +0000 (19:27 +0000)]
Revert "Pedantic strict equals."

This reverts commit b24fafd6066f8bffeb2b4c0b9e8e22d1b2f07cf2.

Reason for revert: T199504

The strict comparisons changes semantics when parameters are not set and thus null.

This could be fixed by setting the right defaults when getting parameter values, but needs a closer look.

Bug: T199504
Change-Id: I7b3e5d4f4d50af6603b3414be099d5bda6571387

5 years agoMerge "rcfilters: Fix filter menu checkbox alignment after OOUI v0.27.5 release"
jenkins-bot [Fri, 13 Jul 2018 19:01:20 +0000 (19:01 +0000)]
Merge "rcfilters: Fix filter menu checkbox alignment after OOUI v0.27.5 release"

5 years agoEnsure LanguageCode::bcp47() returns a valid BCP 47 language code
C. Scott Ananian [Tue, 26 Jun 2018 20:39:57 +0000 (16:39 -0400)]
Ensure LanguageCode::bcp47() returns a valid BCP 47 language code

MediaWiki uses a number of nonstandard codes which do not validate
according to the IANA language subtag registry.  Some of them have
the wrong semantics entirely: MediaWiki's `sr-ec` variant maps to
BCP 47 `sr-EC` which is "Serbian as used in Ethiopia" (!).

Extend LanguageCode::bcp47() to map our nonstandard codes to valid
BCP 47 language codes.  Export the mapping so that it can be used
in JavaScript's corresponding mw.language.bcp47() implementation
as well.

Thanks to TheDJ (I10b4473c7e53f027812bbccf26bb47aec15fddfd) and
Fomafix (I93efc190714ba76247d30ba49fc21ae872fc3555) for previous
attempts at this!

Also removed a fixme for the name of 'Twi', dating back to 2004
(f59c3be23b209e178a917cb14ebedcc243c847b6) -- checking
tw.wikipedia.org it certainly appears that the autonym of 'Twi'
is correctly 'Twi'.

Tracking bugs for invalid language codes are T125073 and T145535.
Discussion of zh-XX => zh-HanX-XX mapping is at T198419.

Bug: T34483
Bug: T106367
Bug: T120847
Change-Id: I807dd55d49e9bd19443329231326a5b0d3e6c453

5 years agoHard-deprecate ContentHandler::makeParserOptions()
Brad Jorsch [Wed, 11 Jul 2018 16:14:53 +0000 (12:14 -0400)]
Hard-deprecate ContentHandler::makeParserOptions()

Followup to I01373b29.

Bug: T194263
Change-Id: I8c5a2a1485d515373d1a0005ee0f5ee782690a2c
Depends-On: I2260fe7322cace9003c3c17be95cfba8df4bdbbe
Depends-On: I7e6a17466ba17f85b4f247b329a0d248855abdd1
Depends-On: I254a583b7f7ddd1797aa40f0ddfb973161185a49
Depends-On: Ib8ed827012c7bd73fcdaa6c0c6edd44869c79f14
Depends-On: Ia95f3e2c1ea944366ff9a478c3c86f8565023394
Depends-On: I4b591969166acdd73ed70b117a7a135d993fa42a

5 years agoDeprecate ContentHandler::makeParserOptions()
Brad Jorsch [Wed, 11 Jul 2018 16:13:18 +0000 (12:13 -0400)]
Deprecate ContentHandler::makeParserOptions()

Having a different ParserOptions for each content model isn't feasible
in an MCR world. And the only thing using this was Wikibase, which has
been fixed to do what it needs in a different way.

Bug: T194263
Change-Id: I01373b29ee25fa9346c6b0317155be4ccdc8c515

5 years agoMerge "Hard deprecate Language::truncate()"
jenkins-bot [Fri, 13 Jul 2018 17:58:03 +0000 (17:58 +0000)]
Merge "Hard deprecate Language::truncate()"

5 years agorcfilters: Fix filter menu checkbox alignment after OOUI v0.27.5 release
James D. Forrester [Fri, 13 Jul 2018 17:33:24 +0000 (10:33 -0700)]
rcfilters: Fix filter menu checkbox alignment after OOUI v0.27.5 release

Bug: T199466
Change-Id: I3ab314d76f9f14aa8bac3d8a840c55e7e00e29e3

5 years agoMerge "Don't armor french spaces before punctuation followed by word characters"
jenkins-bot [Fri, 13 Jul 2018 17:22:34 +0000 (17:22 +0000)]
Merge "Don't armor french spaces before punctuation followed by word characters"

5 years agoMerge "Add test for PageArchive::getPreviousRevision"
jenkins-bot [Fri, 13 Jul 2018 17:19:45 +0000 (17:19 +0000)]
Merge "Add test for PageArchive::getPreviousRevision"

5 years agoMerge "Put <dt>/<dd>/<li> in the always-suppressing category of doBlockLevels"
jenkins-bot [Fri, 13 Jul 2018 16:57:36 +0000 (16:57 +0000)]
Merge "Put <dt>/<dd>/<li> in the always-suppressing category of doBlockLevels"

5 years agoMerge "Use a closure instead of PathRouterPatternReplacer"
jenkins-bot [Fri, 13 Jul 2018 16:44:45 +0000 (16:44 +0000)]
Merge "Use a closure instead of PathRouterPatternReplacer"

5 years agoPut <dt>/<dd>/<li> in the always-suppressing category of doBlockLevels
Arlo Breault [Thu, 12 Jul 2018 18:41:20 +0000 (14:41 -0400)]
Put <dt>/<dd>/<li> in the always-suppressing category of doBlockLevels

This is a clarification of what already happens in practice for lists
generated from wikitext syntax, since that parsing happens
simultaneously.

Parsoid, for its part, does list handling prior to paragraph wrapping,
so must make use of these definitions.

Further, this helps reduce paragraph wrapping in interstitial spacing of
lists from HTML syntax, as spec'd in the tests, though the possibility
isn't eliminated entirely.

The TOC generation code is altered to reduce the number of newlines
emitted in between list items, since those are now left intact.

Change-Id: I6888b6e8e6768b0737565b87924fefa5a06ebd18

5 years agoMerge "<ins>/<del> elements can be phrasing or flow"
jenkins-bot [Fri, 13 Jul 2018 16:22:46 +0000 (16:22 +0000)]
Merge "<ins>/<del> elements can be phrasing or flow"

5 years ago<ins>/<del> elements can be phrasing or flow
Arlo Breault [Thu, 12 Jul 2018 18:31:04 +0000 (14:31 -0400)]
<ins>/<del> elements can be phrasing or flow

The changes to the parserTests.txt highlight the differing opinions that
doBlockLevels and Remex had on whether these should be paragraph wrapped.

Since the only time they wouldn't have been was when found on a line
with other flow tags, this likely isn't a behaviour that was depended on
in practice.  And, indeed, the task describes this as a bug.

A sampling of pages from an insource:/\<(ins|del)\>/ search on wiki bears
this out.

Bug: T17491
Change-Id: I311da777a63aa3c45013f2cfc090be35a022497e

5 years agoUse func_num_args() in MapCacheLRU::clear() for sanity
Aaron Schulz [Fri, 13 Jul 2018 14:15:52 +0000 (15:15 +0100)]
Use func_num_args() in MapCacheLRU::clear() for sanity

Change-Id: Ie11e18a342db0176271e4d08f56a99b0e3caacbe

5 years agoAdd test for PageArchive::getPreviousRevision
daniel [Fri, 13 Jul 2018 10:16:36 +0000 (12:16 +0200)]
Add test for PageArchive::getPreviousRevision

Regression test for  I4e2031f9625744

Change-Id: Id22984bf7d1c3d6f57e827e9f1283231918b59b1

5 years ago[PageArchive] Fetch ar_rev_id instead of ar_id
David Causse [Fri, 13 Jul 2018 09:25:10 +0000 (11:25 +0200)]
[PageArchive] Fetch ar_rev_id instead of ar_id

Introduced in I92afda8, the query fetches ar_id but the code expects
ar_rev_id.

Change-Id: I4e2031f96257449a264142a6d697aca802e897df

5 years agoinstaller: Add missing new-line after "comment fields are up to date"
Timo Tijhof [Fri, 13 Jul 2018 04:15:39 +0000 (21:15 -0700)]
installer: Add missing new-line after "comment fields are up to date"

Before:
> ...comment fields are up to date...hitcounter doesn't exist.
> ...site_stats table does not contain ss_total_views field.

After:
> ...comment fields are up to date.
> ...hitcounter doesn't exist.
> ...site_stats table does not contain ss_total_views field.

Change-Id: Ia99758f9af379a84c20d99e05838802965def3b6

5 years agoDon't throw E_NOTICEs about undefined properties
Jack Phoenix [Fri, 13 Jul 2018 03:33:10 +0000 (06:33 +0300)]
Don't throw E_NOTICEs about undefined properties

Bug: T199494
Change-Id: Id24b9ece76ca0bedcaac29f1a6f5567af78658c1

5 years agoMerge "Let 'shows page creation' test be skipped"
jenkins-bot [Fri, 13 Jul 2018 02:08:00 +0000 (02:08 +0000)]
Merge "Let 'shows page creation' test be skipped"

5 years agoLet 'shows page creation' test be skipped
Stephane Bisson [Thu, 12 Jul 2018 12:34:56 +0000 (08:34 -0400)]
Let 'shows page creation' test be skipped

Troubleshooting can happen in parallel without blocking
unrelated work from being merged.

Bug: T198137
Change-Id: Ie84a868a580968ff99ff6879050080c6495fa72a

5 years agoMerge "Replace use of deprecated Language::truncate()"
jenkins-bot [Thu, 12 Jul 2018 23:39:05 +0000 (23:39 +0000)]
Merge "Replace use of deprecated Language::truncate()"

5 years agoFollow-up 267d99fa8: Fix RELEASE-NOTES-1.32 line length
James D. Forrester [Thu, 12 Jul 2018 21:30:41 +0000 (14:30 -0700)]
Follow-up 267d99fa8: Fix RELEASE-NOTES-1.32 line length

Change-Id: Ib239734a5e0c7d4a6915e6712e6d4767e839f6d9

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 12 Jul 2018 20:16:15 +0000 (22:16 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Iae46fa70b5925ec04bf8d2fda05695e2e7af64d0

5 years agoPedantic strict equals.
Adam Wight [Thu, 5 Jul 2018 12:33:24 +0000 (14:33 +0200)]
Pedantic strict equals.

Change-Id: I53b046def3ce44b218490ee2a1f0a77dc27825d7

5 years agoMerge "WebReponse: Use values altered in 'WebResponseSetCookie' hook"
jenkins-bot [Thu, 12 Jul 2018 18:56:07 +0000 (18:56 +0000)]
Merge "WebReponse: Use values altered in 'WebResponseSetCookie' hook"

5 years agoMerge "Fix populateContentTables.php with no rows"
jenkins-bot [Thu, 12 Jul 2018 18:34:46 +0000 (18:34 +0000)]
Merge "Fix populateContentTables.php with no rows"

5 years agoFix populateContentTables.php with no rows
Brad Jorsch [Wed, 11 Jul 2018 19:00:41 +0000 (15:00 -0400)]
Fix populateContentTables.php with no rows

MIN() and MAX() return null if there are no rows. Fill in a dummy row in
that case.

Change-Id: I7caba98a5ec30e15e19d49effa22a70c78a71c28

5 years agoStringUtils: Deprecate Replacer classes
Kevin Israel [Tue, 10 Jul 2018 15:14:29 +0000 (11:14 -0400)]
StringUtils: Deprecate Replacer classes

The Replacer classes were added in 1.9, when MediaWiki supported PHP 5.0
and 5.1. They were designed to be used with preg_replace_callback() and
StringUtils::delimiterReplaceCallback(). Now that Closures exist in PHP
5.3 and newer, there is no need to define a class for this purpose.

All existing Replacer subclasses are simple enough that their few uses
can easily be replaced with Closures, without making the code harder to
understand. In fact, the code probably becomes easier to understand, as
what each match is replaced with becomes more obvious -- no need to
refer to a separate class.

MediaWiki code search finds no uses in extensions. Thus, these classes
are hard deprecated immediately.

Change-Id: I441c21689909fb06a1ea07a305259eeb82cb2345

5 years agoMerge "Deprecate specialized file errors in OutputPage and fix escaping"
jenkins-bot [Thu, 12 Jul 2018 17:23:49 +0000 (17:23 +0000)]
Merge "Deprecate specialized file errors in OutputPage and fix escaping"

5 years agoMerge "Start working on phan-taint-check warnings. Fix minor escaping issues."
jenkins-bot [Thu, 12 Jul 2018 17:22:14 +0000 (17:22 +0000)]
Merge "Start working on phan-taint-check warnings. Fix minor escaping issues."

5 years agoMerge "Mark InnoDB as recomended in the installer."
jenkins-bot [Thu, 12 Jul 2018 17:17:33 +0000 (17:17 +0000)]
Merge "Mark InnoDB as recomended in the installer."

5 years agoMention MariaDB first, before MySQL in installer.
Brian Wolff [Sat, 7 Jul 2018 15:57:36 +0000 (15:57 +0000)]
Mention MariaDB first, before MySQL in installer.

At this point all WMF servers have been using MariaDB for a while
now. This defacto makes MariaDB the primary target for MediaWiki.
I think we should thus word the installer options as MariaDB
being the primary thing, and mysql being compatible with it,
instead of the other way around.

Also fix reference to debian package php5-mysql. We live in a php 7
world.

Change-Id: Ide585714b1476f9b1b51e032d12c075e1a53de06

5 years agoMark InnoDB as recomended in the installer.
Brian Wolff [Sat, 7 Jul 2018 15:28:16 +0000 (15:28 +0000)]
Mark InnoDB as recomended in the installer.

Most users will have no idea what this is, and I honestly wonder
why we even offer a choice here.

Change-Id: I496d1056f089c35bff321a8206ca264b12a54d56

5 years agoSync up with Parsoid parserTests.txt
Arlo Breault [Thu, 12 Jul 2018 15:18:46 +0000 (11:18 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 564b5d3a37580912793b81a021011e3e33d1219a

Change-Id: I8203797d6d6383a6a2d58d6e6f9a7d46b5c788f3

5 years agoMerge "Special:Log: Convert to HTMLForm"
jenkins-bot [Thu, 12 Jul 2018 11:10:22 +0000 (11:10 +0000)]
Merge "Special:Log: Convert to HTMLForm"

5 years agoStart working on phan-taint-check warnings. Fix minor escaping issues.
Brian Wolff [Thu, 12 Jul 2018 02:48:34 +0000 (02:48 +0000)]
Start working on phan-taint-check warnings. Fix minor escaping issues.

This fixes 26 of the phan-taint-check warnings on MW core. Some
are outright fixed, others are false positives that were suppressed.

This really only covers some of the easy ones. There are still
314 warnings to go.

Change-Id: I30463bc3a09fd4324d190de8533f51784764dd3a

5 years agoMerge "objectcache: make CachedBagOStuff implement makeKeyInternal()"
jenkins-bot [Thu, 12 Jul 2018 03:22:36 +0000 (03:22 +0000)]
Merge "objectcache: make CachedBagOStuff implement makeKeyInternal()"

5 years agoMerge "Add config to use change_tag_def table for Special:Tags"
jenkins-bot [Wed, 11 Jul 2018 22:13:07 +0000 (22:13 +0000)]
Merge "Add config to use change_tag_def table for Special:Tags"

5 years agoMerge "Hide TOC with CSS instead of JavaScript"
jenkins-bot [Wed, 11 Jul 2018 20:36:22 +0000 (20:36 +0000)]
Merge "Hide TOC with CSS instead of JavaScript"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 11 Jul 2018 20:21:50 +0000 (22:21 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I2a5c983b0576df41ee9258890589c45448d24b53

5 years agoMerge "shell.php: prevent permission error"
jenkins-bot [Wed, 11 Jul 2018 20:01:06 +0000 (20:01 +0000)]
Merge "shell.php: prevent permission error"

5 years agoMerge "Convert numerous UNIQUE INDEX to PRIMARY KEY"
jenkins-bot [Wed, 11 Jul 2018 19:52:36 +0000 (19:52 +0000)]
Merge "Convert numerous UNIQUE INDEX to PRIMARY KEY"

5 years agoMerge "rdbms: add IDatabase::lockForUpdate() convenience method"
jenkins-bot [Wed, 11 Jul 2018 19:52:31 +0000 (19:52 +0000)]
Merge "rdbms: add IDatabase::lockForUpdate() convenience method"

5 years agoConvert numerous UNIQUE INDEX to PRIMARY KEY
Reedy [Wed, 4 Jul 2018 19:13:07 +0000 (20:13 +0100)]
Convert numerous UNIQUE INDEX to PRIMARY KEY

MySQL, SQLite, PostgreSQL and MSSQL done with transitional patches.

One additional duplicate index removed from PostgreSQL schema.

Having a PK is essential to do maintenance, specially on large tasks.
By not having a PK it is impossible to add it in a safe way if not done
directly on the master.

Having a PK means that we can easily change the PK into another one if
needed in the future. The ones we chose might not be the best ones, but
will allow us to get them changed.

Bug: T198811
Change-Id: I6b96a427687085c6c24bcd759c9739f81288b919

5 years agoMerge "Rename index type_action to log_type_action"
jenkins-bot [Wed, 11 Jul 2018 19:30:22 +0000 (19:30 +0000)]
Merge "Rename index type_action to log_type_action"

5 years agoRename index type_action to log_type_action
Reedy [Wed, 11 Jul 2018 14:36:27 +0000 (14:36 +0000)]
Rename index type_action to log_type_action

Bug: T51199
Change-Id: I697fd5689e573bfa965ca75385f919c9a8403c14

5 years agoMerge "Update OOUI to v0.27.5"
jenkins-bot [Wed, 11 Jul 2018 19:05:52 +0000 (19:05 +0000)]
Merge "Update OOUI to v0.27.5"

5 years agoMerge "RCFilters: Explicitly set the default highlight color to null"
jenkins-bot [Wed, 11 Jul 2018 18:57:31 +0000 (18:57 +0000)]
Merge "RCFilters: Explicitly set the default highlight color to null"

5 years agoDeprecate specialized file errors in OutputPage and fix escaping
Brian Wolff [Mon, 16 Oct 2017 05:53:30 +0000 (05:53 +0000)]
Deprecate specialized file errors in OutputPage and fix escaping

OutputPage has a number of specialized error reporting methods
related to file handling. With exception of showFileDeleteError,
they are all unused. In my opinion such specialized error handling
does not belong in OutputPage, but in whatever class is generating
the error.

Futhermore, these functions do not appropriately escape their
arguments or their i18n messages. I replaced the one usage
in SpecialUpload with an equivalent that does escape properly.
This is not exploitable as the attacker is not in control of
the temporary file name, but it is very bad practice.

This deprecates the following methods:
* OutputPage::showFileDeleteError()
* OutputPage::showFileNotFoundError()
* OutputPage::showFileRenameError()
* OutputPage::showFileCopyError()
* OutputPage::showUnexpectedValueError()

[Discovered with the help of an experimental phan plugin]

Change-Id: I9e7aaa59ded66f32c78cfdfed1e59e073ffd5051

5 years agoUpdate OOUI to v0.27.5
James D. Forrester [Wed, 11 Jul 2018 18:43:15 +0000 (11:43 -0700)]
Update OOUI to v0.27.5

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

Depends-On: I9d3b2480e1bece91f1e43fd268fa5ab0fbfb89aa
Change-Id: I2896bc9a07ab9939e254b18ee5ff3b38fdf5c44a

5 years agoRCFilters: Explicitly set the default highlight color to null
Roan Kattouw [Tue, 10 Jul 2018 17:56:53 +0000 (10:56 -0700)]
RCFilters: Explicitly set the default highlight color to null

Other code checks !== null on this, and since undefined !== null, it
will incorrectly think a highlight color is set when it's not.

Bug: T199144
Change-Id: I5dbe95ff3c2a5e9c4597a1794a0d3256b671238f

5 years agoUse $lang->hasVariants() instead of count( $lang->getVariants() ) > 1
Fomafix [Tue, 3 Jul 2018 20:14:06 +0000 (22:14 +0200)]
Use $lang->hasVariants() instead of count( $lang->getVariants() ) > 1

Change-Id: I23668c69a8d8cc886168cbbd4f94cf13b597b5a6

5 years agoAdd config to use change_tag_def table for Special:Tags
Amir Sarabadani [Wed, 11 Jul 2018 14:44:28 +0000 (16:44 +0200)]
Add config to use change_tag_def table for Special:Tags

Bug: T199334
Change-Id: Ieb8709caf0d8ee16086296baa75f751c7723c101

5 years agoobjectcache: make CachedBagOStuff implement makeKeyInternal()
Aaron Schulz [Wed, 11 Jul 2018 12:41:46 +0000 (13:41 +0100)]
objectcache: make CachedBagOStuff implement makeKeyInternal()

Change-Id: I38821d131982d103b9d130e7310bc652f57ea696

5 years agordbms: fix value of ChronologyProtector::POSITION_COOKIE_TTL
Aaron Schulz [Wed, 11 Jul 2018 09:39:05 +0000 (10:39 +0100)]
rdbms: fix value of ChronologyProtector::POSITION_COOKIE_TTL

This was supposed to be 10 (~LoadBalancer::MAX_WAIT_DEFAULT) but
ended up as 60 by mistake in 52af356cad (when the constant was added).

Bug: T194403
Change-Id: Ie94949eebaafde2e0c4e2fcffabcb78866363a27

5 years agoMerge "In RevisionStore, use DB_MASTER when READ_LATEST is set."
jenkins-bot [Wed, 11 Jul 2018 09:56:15 +0000 (09:56 +0000)]
Merge "In RevisionStore, use DB_MASTER when READ_LATEST is set."

5 years agoMerge "Simplify PHP by using ?? and ?:"
jenkins-bot [Wed, 11 Jul 2018 09:09:18 +0000 (09:09 +0000)]
Merge "Simplify PHP by using ?? and ?:"

5 years agoMerge "Implement makeKeyInternal() for ReplicatedBagOStuff/MultiWriteBagOStuff"
jenkins-bot [Wed, 11 Jul 2018 05:00:44 +0000 (05:00 +0000)]
Merge "Implement makeKeyInternal() for ReplicatedBagOStuff/MultiWriteBagOStuff"

5 years agoUse a closure instead of PathRouterPatternReplacer
Tim Starling [Fri, 6 Jul 2018 05:53:26 +0000 (15:53 +1000)]
Use a closure instead of PathRouterPatternReplacer

In PHP 5.3+ it's simpler to use closures rather than a replacer class to
pass parameters through to the preg_replace_callback() callback.

Remove without deprecation internal class PathRouterPatternReplacer,
unused in core and Gerrit-hosted extensions.

The new implementation is very similar, except that I renamed some
variables for clarity.

Also fixed an incorrect doc comment parameter type.

Change-Id: I4cd3c0162acdb02d51ab5b7f03b0a16e0a818d99

5 years agoExpand the default watchlist time from 3 to 7 days
James D. Forrester [Tue, 10 Jul 2018 23:08:58 +0000 (16:08 -0700)]
Expand the default watchlist time from 3 to 7 days

Bug: T194414
Change-Id: I682161b93ea018dc1f552b6ac1a0555c162e7339

5 years agoSpecialChangeEmail: Log email changes
Brad Jorsch [Tue, 10 Jul 2018 18:13:58 +0000 (14:13 -0400)]
SpecialChangeEmail: Log email changes

Bug: T151415
Change-Id: Icc403be286f87a591ebc9d3e07d84b09f8b87713

5 years agoSimplify PHP by using ?? and ?:
Fomafix [Wed, 20 Jun 2018 05:26:57 +0000 (07:26 +0200)]
Simplify PHP by using ?? and ?:

Also remove not necessary surrounding parentheses.

Change-Id: I0eb5c9c1bdfb09a800258379cdcefb5fd4d3d21c

5 years agoMerge "mediawiki.language: Combine with 'mediawiki.language.data' and 'mediawiki...
jenkins-bot [Tue, 10 Jul 2018 20:02:07 +0000 (20:02 +0000)]
Merge "mediawiki.language: Combine with 'mediawiki.language.data' and 'mediawiki.language.init'"

5 years agoMerge "mediawiki.api: Simplify mw.Api constructor"
jenkins-bot [Tue, 10 Jul 2018 19:59:30 +0000 (19:59 +0000)]
Merge "mediawiki.api: Simplify mw.Api constructor"

5 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 10 Jul 2018 19:54:00 +0000 (21:54 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3e4bbf58fac272565129be799bb50912296bcb4c

5 years agoReplace redundant Assert calls with native typehint
Timo Tijhof [Tue, 10 Jul 2018 19:10:34 +0000 (12:10 -0700)]
Replace redundant Assert calls with native typehint

* PageUpdater: Plain class type hints never needed Assert,
  not sure why that was here.

* CategoryMembershipChange: The 'callable' typehint was introduced
  in PHP 5.4.

Change-Id: I958bd63a7f9edec3a297f34fe43339fac5f43006

5 years agoIn RevisionStore, use DB_MASTER when READ_LATEST is set.
daniel [Tue, 10 Jul 2018 18:54:33 +0000 (20:54 +0200)]
In RevisionStore, use DB_MASTER when READ_LATEST is set.

This fixes a few instances where a replica connection was used to read
auxilliary data even if the READ_LATEST flag was passed.

Bug: T198869
Change-Id: Ie3b5f7921f939e6bd5216130dc4adcf242e5c624

5 years agordbms: add IDatabase::lockForUpdate() convenience method
Aaron Schulz [Mon, 2 Jul 2018 18:02:54 +0000 (19:02 +0100)]
rdbms: add IDatabase::lockForUpdate() convenience method

Change-Id: I238fd96407e1122e90058e2c4acf743044a267ec

5 years agoMerge "Use master when fetching revision to base a null-revison on."
jenkins-bot [Tue, 10 Jul 2018 18:37:26 +0000 (18:37 +0000)]
Merge "Use master  when fetching revision to base a null-revison on."

5 years agoMerge "Run populateContentTables.php from update.php"
jenkins-bot [Tue, 10 Jul 2018 18:33:51 +0000 (18:33 +0000)]
Merge "Run populateContentTables.php from update.php"

5 years agoMerge "RELEASE-NOTES-1.32: Re-wrap to 80 chars again"
jenkins-bot [Tue, 10 Jul 2018 18:25:11 +0000 (18:25 +0000)]
Merge "RELEASE-NOTES-1.32: Re-wrap to 80 chars again"

5 years agomediawiki.language: Combine with 'mediawiki.language.data' and 'mediawiki.language...
Timo Tijhof [Tue, 10 Jul 2018 04:43:09 +0000 (21:43 -0700)]
mediawiki.language: Combine with 'mediawiki.language.data' and 'mediawiki.language.init'

The latter two modules are never used separately and have no references
anywhere in Wikimedia Git outside MediaWiki core.

Remove without deprecation as they were introduced only as internal
work-around to be able to call setData after init.js and the rest of
'mediawiki.language'. Which is actually trivially done by concatenating
one after the other, but for some reason I didn't think of that when
reviewing 4c6c50f20661 in 2012.

Also fix an annoying race condition in the unit tests that
often caused tests to fail locally.

Change-Id: Ic61f86b0dcbfac82da230770f66cb72e97bd9a03

5 years agoUse master when fetching revision to base a null-revison on.
daniel [Tue, 10 Jul 2018 17:54:11 +0000 (19:54 +0200)]
Use master  when fetching revision to base a null-revison on.

Bug: T198869
Change-Id: I7396246581deabc2cb7206b3e5d2a6f97f6d7418

5 years agoMerge "Special:PasswordReset: Make the user field a user lookahead field, not just...
jenkins-bot [Tue, 10 Jul 2018 17:24:24 +0000 (17:24 +0000)]
Merge "Special:PasswordReset: Make the user field a user lookahead field, not just text"

5 years agoRun populateContentTables.php from update.php
Brad Jorsch [Tue, 10 Jul 2018 17:09:37 +0000 (13:09 -0400)]
Run populateContentTables.php from update.php

Since update.php will eventually be dropping the old columns and fields,
we should make sure the migration script gets run first.

Bug: T197818
Change-Id: I47f5ba4e21b4fe2ef0beb9fc83896cd4b0a0d505

5 years agomediawiki.api: Simplify mw.Api constructor
Timo Tijhof [Tue, 10 Jul 2018 04:14:28 +0000 (21:14 -0700)]
mediawiki.api: Simplify mw.Api constructor

* Use a different variable for the argument and the created
  'defaults' object for this instance.

* Don't modify the given object (it could previously modify
  the 'ajax.url' property).

* Make the 'useUS' logic more explicit and merge it with the
  'ajax.url'  handling, that it previously reacted to.

Change-Id: Ib1f50876359152935b8cb9b021ea0a95915808e2

5 years agomw.special.preferences: Prevent invisible accessibility hint from affecting content
Bartosz Dziewoński [Tue, 10 Jul 2018 15:28:43 +0000 (17:28 +0200)]
mw.special.preferences: Prevent invisible accessibility hint from affecting content

With the current styles, if there is some text before the preferences
form (it can be defined in the 'preferences-summary' message), the
`<div class="mw-navigation-hint">` somehow pushes the rest of the page
content down by a few pixels. I think it might be preventing some
margins from collapsing? This actually causes a tiny FOUC after the
styles load.

Instead, use a neat pure CSS technique borrowed from Vector:
b843094a2d8c27a17e2c2b2ba97fb4aeea1d95d4.

I'm only changing the OOUI version, since the old one doesn't have the
problem.

Bug: T195986
Change-Id: I21924dd13bb83a0cb75b337ae7439c8ad8357946

5 years agoMerge "List deleted revisions in well defined order"
jenkins-bot [Tue, 10 Jul 2018 15:05:27 +0000 (15:05 +0000)]
Merge "List deleted revisions in well defined order"

5 years agoMerge "[MCR] Make PageArchive aware of MCR"
jenkins-bot [Tue, 10 Jul 2018 15:04:59 +0000 (15:04 +0000)]
Merge "[MCR] Make PageArchive aware of MCR"

5 years agoList deleted revisions in well defined order
daniel [Tue, 10 Jul 2018 14:39:37 +0000 (16:39 +0200)]
List deleted revisions in well defined order

Change-Id: I3040e0a3f6367809a22198b8b3f76048aa6c1562

5 years ago[MCR] Make PageArchive aware of MCR
daniel [Fri, 13 Apr 2018 12:01:18 +0000 (14:01 +0200)]
[MCR] Make PageArchive aware of MCR

Bug: T194015
Change-Id: I92afda87961860983f080d96fa0616a6fcca64e4

5 years agoImplement makeKeyInternal() for ReplicatedBagOStuff/MultiWriteBagOStuff
Aaron Schulz [Tue, 10 Jul 2018 12:25:04 +0000 (13:25 +0100)]
Implement makeKeyInternal() for ReplicatedBagOStuff/MultiWriteBagOStuff

Make these proxy to the "write"/"main" cache backend like the other
key methods.

Change-Id: Ie176577d9b52807493d6da9eea963ba440b86330

5 years agoSpecial:Log: Convert to HTMLForm
Prateek Saxena [Wed, 25 Apr 2018 05:22:19 +0000 (10:52 +0530)]
Special:Log: Convert to HTMLForm

* All Xml generation code has been removed.

* The LogEventsListGetExtraInputs hook now needs a form
  descriptor array and not plain HTML.
  See I37e0d3e81a46239750465b9299279fbbd7c7f87a.

* LogPager and LogEventList also take the $day parameter
  for 'From date (and earlier)' and pass it to getDateCond
  as well.

* Since FormOptions can't automatically extract the date
  from the request this is being done manually in the
  execute method of Special:Log using MWTimestamp.

Bug: T117737
Change-Id: Iba3c6aa5ac40dcdee0792c2d045b238b02d76521

5 years agoMerge "mediawiki.inspect: Add headings to console and use console.group()"
jenkins-bot [Tue, 10 Jul 2018 11:15:05 +0000 (11:15 +0000)]
Merge "mediawiki.inspect: Add headings to console and use console.group()"