lhc/web/wiklou.git
3 years agoMerge "Simplify HTMLTitleTextField::validate"
jenkins-bot [Wed, 26 Sep 2018 13:19:49 +0000 (13:19 +0000)]
Merge "Simplify HTMLTitleTextField::validate"

3 years agoMerge "Add constant for the name of the 'main' slot for MCR"
jenkins-bot [Wed, 26 Sep 2018 11:55:10 +0000 (11:55 +0000)]
Merge "Add constant for the name of the 'main' slot for MCR"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Wed, 26 Sep 2018 10:55:57 +0000 (12:55 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I07d0eeb9c99e1551899d05453abc0398444210aa

3 years agoMerge "Use OutputPage::addWikiTextTidy() when text is in content language"
jenkins-bot [Wed, 26 Sep 2018 10:50:36 +0000 (10:50 +0000)]
Merge "Use OutputPage::addWikiTextTidy() when text is in content language"

3 years agoMerge "Don't wrap output added by OutputPage::addWikiText*()"
jenkins-bot [Wed, 26 Sep 2018 10:50:27 +0000 (10:50 +0000)]
Merge "Don't wrap output added by OutputPage::addWikiText*()"

3 years agoMerge "Logging related to WikiExport cleanup and changes in T203424"
jenkins-bot [Wed, 26 Sep 2018 03:29:49 +0000 (03:29 +0000)]
Merge "Logging related to WikiExport cleanup and changes in T203424"

3 years agoMerge "ImageHistoryPseudoPager: Protect against TimestampException from bad user...
jenkins-bot [Wed, 26 Sep 2018 00:48:42 +0000 (00:48 +0000)]
Merge "ImageHistoryPseudoPager: Protect against TimestampException from bad user input"

3 years agoImageHistoryPseudoPager: Protect against TimestampException from bad user input
James D. Forrester [Mon, 24 Sep 2018 18:21:17 +0000 (11:21 -0700)]
ImageHistoryPseudoPager: Protect against TimestampException from bad user input

Bug: T204796
Change-Id: I17455fef0d899c56ce10f0df0db3457d944e353d

3 years agoMerge "Forward X-Search-ID header to search suggest tracking"
jenkins-bot [Tue, 25 Sep 2018 20:24:41 +0000 (20:24 +0000)]
Merge "Forward X-Search-ID header to search suggest tracking"

3 years agoMerge "Tidy and rename WebInstallerOutput::addWikiText() to addWikiTextInterface()"
jenkins-bot [Tue, 25 Sep 2018 19:42:28 +0000 (19:42 +0000)]
Merge "Tidy and rename WebInstallerOutput::addWikiText() to addWikiTextInterface()"

3 years agoForward X-Search-ID header to search suggest tracking
Erik Bernhardson [Tue, 25 Sep 2018 16:34:28 +0000 (09:34 -0700)]
Forward X-Search-ID header to search suggest tracking

This header can be injected into api responses that include
search results to provide a link between the backend logs
and any frontend logging. Associating autocomplete tracking
with backend logs will allow us to determine autocomplete
examination probabilities, and more generally be able to
evaluate autocomplete effectiveness.

Bug: T205348
Change-Id: I1663906e2fd71f7df215e563b09a0b4fb8948ab8

3 years agoMerge "OutputPageTest should be independent of $wgResourceLoaderDebug setting"
jenkins-bot [Tue, 25 Sep 2018 19:36:07 +0000 (19:36 +0000)]
Merge "OutputPageTest should be independent of $wgResourceLoaderDebug setting"

3 years agoTidy and rename WebInstallerOutput::addWikiText() to addWikiTextInterface()
C. Scott Ananian [Fri, 21 Sep 2018 16:25:26 +0000 (12:25 -0400)]
Tidy and rename WebInstallerOutput::addWikiText() to addWikiTextInterface()

This change parallels the new method added to OutputPage in
Ia58910164baaca608cea3b24333b7d13ed773339 and ensures that the
content added is always tidied.  We leave the old alias in
place for now in accordance with our deprecation policy.

Change-Id: I89f3398cffa771afcd5a33cfd11eb8510af3e7f7

3 years agoUse OutputPage::addWikiTextTidy() when text is in content language
C. Scott Ananian [Fri, 21 Sep 2018 16:58:36 +0000 (12:58 -0400)]
Use OutputPage::addWikiTextTidy() when text is in content language

The default for OutputPage::addWikiText is $interface=true, which
suppresses language conversion and treats the output as being in
the user interface language.

Change-Id: Ife33ceed39ed01d4e9af18e9108026f341e9b343

3 years agoDon't wrap output added by OutputPage::addWikiText*()
C. Scott Ananian [Tue, 25 Sep 2018 13:06:12 +0000 (09:06 -0400)]
Don't wrap output added by OutputPage::addWikiText*()

There are three methods affected: `OutputPage::addWikiTextTidy()`,
`OutputPage::addWikiTextTitleTidy()`, and
`OutputPage::addWikiTextWithTitle()`.

There's a special case in Parser.php which adds the wrapper class from
ParserOptions to the ParserOutput only if "interface mode" is off; the
affected methods default to adding output in "content language" mode
(not "interface language" mode), but they seem to be used for
"interface messages in the content language" (rare) and so should also
be unwrapped.  This would make all the `OutputPage::addWikiText*()`
methods consistent.

The `OutputPage::addWikiTextTidy()` method is only used once in the WMF
repositories, where it is used to insert an interface message in the
content language:

https://gerrit.wikimedia.org/g/mediawiki/extensions/ProofreadPage/+/91cd2a928f53e12f7c41bc59f1085b5415632511/SpecialProofreadPages.php#40

The `OutputPage::addWikiTextWithTitle()` method is used by no one:

https://codesearch.wmflabs.org/search/?q=addWikiTextWithTitle%5C(

The `OutputPage::addWikiTextTitleTidy()` method is used only in core:

https://gerrit.wikimedia.org/g/mediawiki/core/+/3888c001a1dbc04f1fd6bb51328b1cb1296c02f6/includes/EditPage.php#2669

It seems clear that the output in this case is intended to be
unwrapped as well (the codepath adds its own explicit wrapper).

Ia58910164baaca608cea3b24333b7d13ed773339 will add additional
documentation to clarify the distinction between the different
OutputPage::addWikiText*() methods, but I felt it safer to make
this particular change first as a standalone patch, just in case
it had unexpected side effects or merited further discussion.

Change-Id: I3e5b598d358819191562b56d40ebf1cb6f3cda41

3 years agoMake maintenance/parse.php default to tidy output
C. Scott Ananian [Thu, 20 Sep 2018 15:16:07 +0000 (11:16 -0400)]
Make maintenance/parse.php default to tidy output

We are deprecating the non-tidy modes of the parser.

While we're at it, remove the output wrapper by default (in
both tidy and no-tidy modes).

Bug: T198214
Change-Id: Ieb51cb0f3a8a62e272d76c368f29fb63c030c522

3 years agoMerge "Ensure disabled deprecation warnings are re-enabled before next test"
jenkins-bot [Tue, 25 Sep 2018 17:13:14 +0000 (17:13 +0000)]
Merge "Ensure disabled deprecation warnings are re-enabled before next test"

3 years agoOutputPageTest should be independent of $wgResourceLoaderDebug setting
C. Scott Ananian [Tue, 25 Sep 2018 14:31:57 +0000 (10:31 -0400)]
OutputPageTest should be independent of $wgResourceLoaderDebug setting

`OutputPageTest::testMakeResourceLoaderLink()` and
`OutputPageTest::testBuildExemptModules()` tried to force
`$wgResourceLoaderDebug=false` before running the test, but they
neglected to clear the resource loader debug cache
(`ResourceLoader::clearCache()`) so the user's local setting of
`$wgResourceLoaderDebug` would be used despite it all.

Change-Id: I3e7dec762c8a02683fc66a630c950b72a4840a9b

3 years agoMerge "Deprecate the 'disabletidy' parameter for ApiParse"
jenkins-bot [Tue, 25 Sep 2018 16:50:36 +0000 (16:50 +0000)]
Merge "Deprecate the 'disabletidy' parameter for ApiParse"

3 years agoMerge "OutputPageTest: Don't rely on side effects of previous tests"
jenkins-bot [Tue, 25 Sep 2018 16:41:07 +0000 (16:41 +0000)]
Merge "OutputPageTest: Don't rely on side effects of previous tests"

3 years agoMerge "Suppress deprecation warnings for b/c use of UsageException::getMessageArray()"
jenkins-bot [Tue, 25 Sep 2018 16:41:02 +0000 (16:41 +0000)]
Merge "Suppress deprecation warnings for b/c use of UsageException::getMessageArray()"

3 years agoEnsure disabled deprecation warnings are re-enabled before next test
C. Scott Ananian [Fri, 21 Sep 2018 15:20:36 +0000 (11:20 -0400)]
Ensure disabled deprecation warnings are re-enabled before next test

Tests should not interfere with each other; disabled deprecation
warnings should be disabled for a single test case only.

Bug: T191960
Change-Id: Ic9b892bc83ba6d71c1077df0d93c95dde36988bb

3 years agoOutputPageTest: Don't rely on side effects of previous tests
C. Scott Ananian [Tue, 25 Sep 2018 14:21:24 +0000 (10:21 -0400)]
OutputPageTest: Don't rely on side effects of previous tests

Use the proper `MediaWikiTextCase::hideDeprecated()` method.

Bug: T191960
Change-Id: I974618a0bd1e11434d167820d119dcfd6e47b092

3 years agoAdd a maintenance script to remove all users from a User Group
Reedy [Sun, 29 Jul 2018 02:42:42 +0000 (03:42 +0100)]
Add a maintenance script to remove all users from a User Group

Bug: T185989
Change-Id: Ie5cc95b350230bc730c1f1d9f06fc3e95c5f6bd0

3 years agoAdd constant for the name of the 'main' slot for MCR
Gergő Tisza [Mon, 24 Sep 2018 21:10:08 +0000 (14:10 -0700)]
Add constant for the name of the 'main' slot for MCR

Bug: T202142
Change-Id: I97a74e5a029b014f3c2195188936d5c8233c1b7f

3 years agoHard deprecate EventRelayerGroup::singleton()
Kunal Mehta [Mon, 24 Sep 2018 23:09:28 +0000 (16:09 -0700)]
Hard deprecate EventRelayerGroup::singleton()

No uses spotted by codesearch.

Change-Id: If2bffc7a216cf7b437ff112794742d5af0dd30fd

3 years agoMerge "Remove repeated line in RELEASE-NOTES-1.32"
jenkins-bot [Mon, 24 Sep 2018 22:27:57 +0000 (22:27 +0000)]
Merge "Remove repeated line in RELEASE-NOTES-1.32"

3 years agoMerge "Use binary charset in default table options"
jenkins-bot [Mon, 24 Sep 2018 22:12:55 +0000 (22:12 +0000)]
Merge "Use binary charset in default table options"

3 years agoDeprecate the 'disabletidy' parameter for ApiParse
C. Scott Ananian [Fri, 21 Sep 2018 14:57:18 +0000 (10:57 -0400)]
Deprecate the 'disabletidy' parameter for ApiParse

This will be unsupported by future wikitext parsers, which always
construct well-formed HTML.

Bug: T198214
Change-Id: Ic189cd1b38bca5b9ec0ef9810555fe0cbd8b733d

3 years agoRemove repeated line in RELEASE-NOTES-1.32
C. Scott Ananian [Mon, 24 Sep 2018 21:26:29 +0000 (17:26 -0400)]
Remove repeated line in RELEASE-NOTES-1.32

"Added 'ApiParseMakeOutputPage' hook." was added twice to the release
notes: once by 3f1142045f51328197239aa62882881003bb9cdb and again by
07842be379ca3d4d0bc0608c217dd0e8cd7cbe4b.

Change-Id: I8df1ea4e92d47858485d49b4d28fe96a91662a32

3 years agoSuppress deprecation warnings for b/c use of UsageException::getMessageArray()
C. Scott Ananian [Mon, 24 Sep 2018 21:16:10 +0000 (17:16 -0400)]
Suppress deprecation warnings for b/c use of UsageException::getMessageArray()

Follow up to efaaa2c1d61964dffcd8427cf52568020f9067ea (which was a
follow up to Iae0e2ce3).

These are exposed when T191960 is fixed.

Change-Id: I7c517b5a7cccfe9c324d0a9eeb7d774aa1be8adb

3 years agoMerge "resourceloader: Mark clearCache() as private (only for tests)"
jenkins-bot [Mon, 24 Sep 2018 20:50:19 +0000 (20:50 +0000)]
Merge "resourceloader: Mark clearCache() as private (only for tests)"

3 years agoMerge "Update wikimedia/timestamp to v2.2.0"
jenkins-bot [Mon, 24 Sep 2018 20:50:14 +0000 (20:50 +0000)]
Merge "Update wikimedia/timestamp to v2.2.0"

3 years agoMerge "Provide a way to restore an old revision with multiple slots."
jenkins-bot [Mon, 24 Sep 2018 19:36:32 +0000 (19:36 +0000)]
Merge "Provide a way to restore an old revision with multiple slots."

3 years agoSimplify HTMLTitleTextField::validate
Umherirrender [Sat, 18 Aug 2018 02:53:01 +0000 (04:53 +0200)]
Simplify HTMLTitleTextField::validate

Title::makeName already provide a way to build a title string with
namespace text

Change-Id: I21518ca9d7c6101fc866f8d667a88cc7bdf5ae7c

3 years agoProvide a way to restore an old revision with multiple slots.
daniel [Tue, 18 Sep 2018 15:36:59 +0000 (17:36 +0200)]
Provide a way to restore an old revision with multiple slots.

Bug: T204732
Change-Id: I0ea2711e68c78465a5e5cfaa0181ad5ce983d35a

3 years agoresources: Register 'sinonjs' as foreign resource
Timo Tijhof [Mon, 24 Sep 2018 01:39:56 +0000 (02:39 +0100)]
resources: Register 'sinonjs' as foreign resource

Change-Id: I9b1740f34c2415c27936a970979a49bf143771c7

3 years agoMerge "resources: Make jquery.cookie a multi-file resource with changelog, licence"
jenkins-bot [Mon, 24 Sep 2018 17:38:15 +0000 (17:38 +0000)]
Merge "resources: Make jquery.cookie a multi-file resource with changelog, licence"

3 years agoMerge "resourceloader: Add filter cache version to module version hash"
jenkins-bot [Mon, 24 Sep 2018 17:38:09 +0000 (17:38 +0000)]
Merge "resourceloader: Add filter cache version to module version hash"

3 years agoMerge "resourceloader: Remove MW cacheEpoch from module version hash"
jenkins-bot [Mon, 24 Sep 2018 17:35:22 +0000 (17:35 +0000)]
Merge "resourceloader: Remove MW cacheEpoch from module version hash"

3 years agoMerge "McrUndoAction: Fix preview"
jenkins-bot [Mon, 24 Sep 2018 17:34:22 +0000 (17:34 +0000)]
Merge "McrUndoAction: Fix preview"

3 years agoMerge "Code to read from change_tag_def table instead of valid_tag"
jenkins-bot [Mon, 24 Sep 2018 17:19:48 +0000 (17:19 +0000)]
Merge "Code to read from change_tag_def table instead of valid_tag"

3 years agoresources: Make jquery.cookie a multi-file resource with changelog, licence
James D. Forrester [Mon, 24 Sep 2018 17:14:31 +0000 (10:14 -0700)]
resources: Make jquery.cookie a multi-file resource with changelog, licence

Change-Id: I47e25b1a7ac7d53932dfdfd37a47a38141f91be4

3 years agoresourceloader: Add filter cache version to module version hash
Roan Kattouw [Fri, 29 Sep 2017 20:35:00 +0000 (13:35 -0700)]
resourceloader: Add filter cache version to module version hash

We already had a $filterCacheVersion variable, but it was
only used for the internal cache for JS and CSS minification,
which is not enough. If there is a breaking change in either
of these processes, we also need to invalidate version hashes.

This commit renames ResourceLoader::$filterCacheVersion to
ResourceLoader::CACHE_VERSION and takes it into account in
getVersionHash(). Adding it to getDefinitionSummary() is not
sufficient, because content-hashed modules also need to be
invalidated when there's a breaking change in the minifiers.

This cache version can also be incremented when there's a
breaking change in image embedding or LESS compilation,
although content hashing deals with that already, so we
could also add a separate cache version for those that's
only added to getDefinitionSummary().

Bug: T176884
Change-Id: Ife6efa71f310c90b9951afa02212b2cb6766e76d

3 years agoresourceloader: Remove MW cacheEpoch from module version hash
Timo Tijhof [Fri, 14 Sep 2018 00:13:57 +0000 (01:13 +0100)]
resourceloader: Remove MW cacheEpoch from module version hash

This seems quite nuclear. I'd actually like to deprecate the
wgCacheEpoch variable more generally in favour of a handful
of more specific version constants, but as starting point,
remove it from the hash used for load.php urls and localStorage
keys.

The latter is also controlled by wgResourceLoaderStorageVersion
already.

Also ref T32956 about a more standalone ResourceLoader.

Change-Id: I913f846090e82d3d822653b9b7ce22233cdb5e90

3 years agoMerge "Remove unnecesary else blocks"
jenkins-bot [Mon, 24 Sep 2018 16:37:55 +0000 (16:37 +0000)]
Merge "Remove unnecesary else blocks"

3 years agoMerge "SpecialLog: Don't throw exceptions on invalid date from user input"
jenkins-bot [Mon, 24 Sep 2018 16:17:07 +0000 (16:17 +0000)]
Merge "SpecialLog: Don't throw exceptions on invalid date from user input"

3 years agoSpecialLog: Don't throw exceptions on invalid date from user input
Kunal Mehta [Sun, 23 Sep 2018 18:58:14 +0000 (11:58 -0700)]
SpecialLog: Don't throw exceptions on invalid date from user input

If users provide invalid input to the date option on Special:Log (most likely
an intentional thing given the calendar input widget), don't let the
TimestampException bubble up - just discard the invalid date.

Integration test included, which fails without this patch.

Bug: T201411
Change-Id: Ie1a9a84343ae4e78e076586f759917e5fd5af33c

3 years agoMerge "resources: Register jquery.cookie as foreign resource"
jenkins-bot [Mon, 24 Sep 2018 15:45:43 +0000 (15:45 +0000)]
Merge "resources: Register jquery.cookie as foreign resource"

3 years agoresources: Register jquery.cookie as foreign resource
Fomafix [Sun, 23 Sep 2018 20:50:16 +0000 (22:50 +0200)]
resources: Register jquery.cookie as foreign resource

Change-Id: Ia6b1aed25ad6d70aa2035340205406f68297e8bb

3 years agoMerge "RevisionStoreDbTestBase, remove redundant needsDB override"
jenkins-bot [Mon, 24 Sep 2018 13:48:21 +0000 (13:48 +0000)]
Merge "RevisionStoreDbTestBase, remove redundant needsDB override"

3 years agoRemove unnecesary else blocks
Reedy [Mon, 24 Sep 2018 13:08:31 +0000 (14:08 +0100)]
Remove unnecesary else blocks

Change-Id: Ic11e0e6b86557cbffcc5faa54de218b4676b4712

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 24 Sep 2018 06:50:27 +0000 (08:50 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I679340214f984a89d207db7b865519010d4737e0

3 years agoMerge "registration: Let extensions add PHP version requirements"
jenkins-bot [Mon, 24 Sep 2018 05:43:18 +0000 (05:43 +0000)]
Merge "registration: Let extensions add PHP version requirements"

3 years agoUpdate wikimedia/timestamp to v2.2.0
Kunal Mehta [Mon, 24 Sep 2018 04:32:19 +0000 (21:32 -0700)]
Update wikimedia/timestamp to v2.2.0

Depends-On: Ibe47c7e363d263be37c7ebe3891e46f04a3481bd
Change-Id: Id8901d0a0d30bf402220aca73f9c5f45043908ce

3 years agoMerge "Pass title to Revision constructor in Title::getFirstRevision "
jenkins-bot [Mon, 24 Sep 2018 00:09:18 +0000 (00:09 +0000)]
Merge "Pass title to Revision constructor in Title::getFirstRevision "

3 years agoMerge "Fix caller name in Title::loadRestrictions"
jenkins-bot [Sun, 23 Sep 2018 23:07:24 +0000 (23:07 +0000)]
Merge "Fix caller name in Title::loadRestrictions"

3 years agoMerge "resources: Update mustache.js from 0.8.2-d9aa703 to v1.0.0"
jenkins-bot [Sun, 23 Sep 2018 20:41:49 +0000 (20:41 +0000)]
Merge "resources: Update mustache.js from 0.8.2-d9aa703 to v1.0.0"

3 years agoMerge "resources: Register mustache.js as foreign resource"
jenkins-bot [Sun, 23 Sep 2018 20:41:44 +0000 (20:41 +0000)]
Merge "resources: Register mustache.js as foreign resource"

3 years agoMerge "Remove MimeMagic"
jenkins-bot [Sun, 23 Sep 2018 20:29:58 +0000 (20:29 +0000)]
Merge "Remove MimeMagic"

3 years agoRemove MimeMagic
Reedy [Fri, 21 Sep 2018 01:40:59 +0000 (02:40 +0100)]
Remove MimeMagic

Deprecated since 1.28

Change-Id: I793deb8669e353525464ccd840801e5015c545c8

3 years agoresources: Update mustache.js from 0.8.2-d9aa703 to v1.0.0
Timo Tijhof [Sun, 23 Sep 2018 19:18:47 +0000 (20:18 +0100)]
resources: Update mustache.js from 0.8.2-d9aa703 to v1.0.0

Upstream commit 'd9aa703' is the commit right before the tagging
of v1.0.0. The only difference is the version string.

Change-Id: Icf7b7abacac583984977183da6f93f5fd02404fa

3 years agoresources: Register mustache.js as foreign resource
Timo Tijhof [Sun, 23 Sep 2018 19:13:42 +0000 (20:13 +0100)]
resources: Register mustache.js as foreign resource

The original commit that added it (7c52c9265b) did not specify
where it came from or which version. The source refers to
<https://github.com/janl/mustache.js> and contains a version string
stating "0.8.2". However, this file does not match the source
code of released version "0.8.2".

Instead, our copy seems to match the source ode of release
v1.0.0 (except for the version string).

The only commit in the uptream repository that matches our
copy is the commit right before the "Tag v1.0.0" commit,
at which point it had all changes of v1.0.0, but still had
the version string of the last published version. I assume then
at this file was copied from the GitHub master branch at the
time.

I'll update it to v1.0.0 proper in a separate commit.

Change-Id: I37c69e71fd4b005532cb0ac80964c72d3921eae6

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sun, 23 Sep 2018 07:47:04 +0000 (09:47 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I8256de37811bb514aeca3153f98f8aefdf8cc489

3 years agoresourceloader: Mark clearCache() as private (only for tests)
Timo Tijhof [Sat, 22 Sep 2018 16:45:18 +0000 (17:45 +0100)]
resourceloader: Mark clearCache() as private (only for tests)

Exclude from coverage report as well.

Change-Id: I5281b42dab802d5a5a58ee33a3b12a77229503c8

3 years agoPass title to Revision constructor in Title::getFirstRevision
Umherirrender [Sat, 22 Sep 2018 14:03:35 +0000 (16:03 +0200)]
Pass title to Revision constructor in Title::getFirstRevision

The information for a title already in the select result.
Give it to Revision class to avoid extra Title::newFromId in
Revision::ensureTitle for each row

Change-Id: I6f1a936ce2ed1834feb29850e65a497dafe35238

3 years agoFix caller name in Title::loadRestrictions
Umherirrender [Sat, 22 Sep 2018 13:47:03 +0000 (15:47 +0200)]
Fix caller name in Title::loadRestrictions

Seeing {closure} in the logs as caller is not helpful

Change-Id: I34aead30c55aefb7591cbc6031522d0f0e5bd17a

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Sat, 22 Sep 2018 07:28:29 +0000 (09:28 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I693c5ed47ebe4326ec6c7e61f692cae48b71d8b6

3 years agoregistration: Let extensions add PHP version requirements
MGChecker [Sat, 8 Sep 2018 00:02:53 +0000 (02:02 +0200)]
registration: Let extensions add PHP version requirements

While MediaWiki Core already sets requirements for PHP versions, it should be
possible for extensions to tighten these requirements. This mirrors the PHP
parameter of extension infoboxes as well.

This change introduces a new 'platform' key (in addition to 'MediaWiki', 'skins'
and 'extensions', where non-MediaWiki software requirements will be listed
in the future, starting with a PHP version constraint. Further keys are
supposed to be added to allow setting constraints against php extensions
and other abilities of the platform.

Bug: T197535
Change-Id: I6744cc0be2363b603331af9dc860eb8603a1a89a

3 years agoFix some double escaping, and some incorrect escaping for convert()
Brian Wolff [Thu, 20 Sep 2018 06:28:40 +0000 (06:28 +0000)]
Fix some double escaping, and some incorrect escaping for convert()

convert() is weird and requires things to be escaped before it
is called.

This fixes a bunch of phan-taint-check warnings.

Change-Id: I422b313ca05ff61ae05e06856347cc0de832cc49

3 years agoFix some phan-taint-check false positives
Brian Wolff [Thu, 20 Sep 2018 05:38:05 +0000 (05:38 +0000)]
Fix some phan-taint-check false positives

Change-Id: Ic5ccbb3f97722476bee7188b83b80cdc652d2a64

3 years agoDeprecate QuickTemplate::msgHtml & fix phan-taint-warning in includes/skins
Brian Wolff [Thu, 20 Sep 2018 04:31:21 +0000 (04:31 +0000)]
Deprecate QuickTemplate::msgHtml & fix phan-taint-warning in includes/skins

QuickTemplate::msgHtml() (And the weird override that does the
same thing a different way - BaseTemplate::msgHtml()) are inherently
unsafe as they echo out a raw html message. This is strongly
discouraged in modern code. According to codeSearch tool, nothing
uses these methods, and there is a "@private" annotation on the
QuickTemplate::msgHtml() docblock. Thus hard deprecating it.

Change-Id: I4e9e157e922a36787adef4d0bf7608605c27f0c4

3 years agoMerge "Remove global namespaced LBFactory"
jenkins-bot [Fri, 21 Sep 2018 23:40:45 +0000 (23:40 +0000)]
Merge "Remove global namespaced LBFactory"

3 years agoMerge "Set consistent min value options for RC and Watchlist filters"
jenkins-bot [Fri, 21 Sep 2018 20:18:24 +0000 (20:18 +0000)]
Merge "Set consistent min value options for RC and Watchlist filters"

3 years agoSet consistent min value options for RC and Watchlist filters
Kosta Harlan [Fri, 21 Sep 2018 19:17:16 +0000 (15:17 -0400)]
Set consistent min value options for RC and Watchlist filters

Bug: T204623
Bug: T199049
Change-Id: If73b7cf6734f4a6a8d8e47ce8051a827ae5452e1

3 years agoMerge "CommentStore: Hard-deprecate newKey()"
jenkins-bot [Fri, 21 Sep 2018 18:42:23 +0000 (18:42 +0000)]
Merge "CommentStore: Hard-deprecate newKey()"

3 years agoRemove global namespaced LBFactory
Reedy [Fri, 21 Sep 2018 01:24:43 +0000 (02:24 +0100)]
Remove global namespaced LBFactory

Change-Id: Ia87aa5c9426af83627a1bbc9bd914546c89c1e47

3 years agoMerge "Hard deprecate non-Remex tidy modes"
jenkins-bot [Fri, 21 Sep 2018 15:37:46 +0000 (15:37 +0000)]
Merge "Hard deprecate non-Remex tidy modes"

3 years agoMcrUndoAction: Fix preview
Brad Jorsch [Fri, 21 Sep 2018 14:43:48 +0000 (10:43 -0400)]
McrUndoAction: Fix preview

Apparently DifferenceEngine::renderNewRevision() never really worked
right, it only functions when diffing *saved* revisions. Replace the
preview code with code adapted from EditPage::getPreviewText(), using
RevisionRenderer for the actual rendering.

Bug: T205101
Change-Id: I416ede84c8d10fc28866e608c9cfc3a2a7410e48

3 years agoHard deprecate non-Remex tidy modes
C. Scott Ananian [Thu, 20 Sep 2018 21:27:59 +0000 (17:27 -0400)]
Hard deprecate non-Remex tidy modes

Let's rip the band-aid off.  Remex is pure PHP so there's no reason to
be running any of the other tidy implementations any more, and we won't
be able to support them in the future.

Follow-up to 7b23382823f2ea7bab8d20ad68950ff34f50a005.

Bug: T198214
Change-Id: Id3d07d44f8434231826e86e623554cac3decfa96

3 years agoDon't show unsaved revision in DifferenceEngine::renderNewRevision.
daniel [Mon, 10 Sep 2018 19:02:26 +0000 (21:02 +0200)]
Don't show unsaved revision in DifferenceEngine::renderNewRevision.

There was a conditional that was documented to make the method bail out
if the current revision was unsaved, but it was missing the actual return
statement.

Note that preview code in EditPage does not use
DifferenceEngine::renderNewRevision.

Change-Id: I86a25e9464435ac17c72f78f7ce1f354adf3d055

3 years agoMerge "selenium: invoke jobs to enforce eventual consistency"
jenkins-bot [Fri, 21 Sep 2018 07:59:13 +0000 (07:59 +0000)]
Merge "selenium: invoke jobs to enforce eventual consistency"

3 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 21 Sep 2018 07:35:22 +0000 (09:35 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I3c35fe761a9e90b551fb1435a354e337808f9f00

3 years agoMerge "tests: Stop using deprecated LBFactory, use namespaced version"
jenkins-bot [Fri, 21 Sep 2018 03:05:19 +0000 (03:05 +0000)]
Merge "tests: Stop using deprecated LBFactory, use namespaced version"

3 years agoMerge "Stop MailAddress accepting a User object"
jenkins-bot [Fri, 21 Sep 2018 02:44:00 +0000 (02:44 +0000)]
Merge "Stop MailAddress accepting a User object"

3 years agotests: Stop using deprecated LBFactory, use namespaced version
Reedy [Fri, 21 Sep 2018 01:21:24 +0000 (02:21 +0100)]
tests: Stop using deprecated LBFactory, use namespaced version

Change-Id: Ifbbbfe1bc58e57739b88588e3b6feb703f20534d

3 years agoMerge "Collapse some unnecessary else conditions"
jenkins-bot [Fri, 21 Sep 2018 02:20:23 +0000 (02:20 +0000)]
Merge "Collapse some unnecessary else conditions"

3 years agoStop MailAddress accepting a User object
Reedy [Fri, 21 Sep 2018 01:12:43 +0000 (02:12 +0100)]
Stop MailAddress accepting a User object

Bug: T204863
Change-Id: I98f110e47ec7ba3b1cd22e8d76eea4bdf7d3d155

3 years agoMerge "Drop support for array syntax for $wgSpecialPages"
jenkins-bot [Fri, 21 Sep 2018 00:37:45 +0000 (00:37 +0000)]
Merge "Drop support for array syntax for $wgSpecialPages"

3 years agoDrop support for array syntax for $wgSpecialPages
Reedy [Thu, 20 Sep 2018 22:56:48 +0000 (23:56 +0100)]
Drop support for array syntax for $wgSpecialPages

Bug: T204863
Change-Id: I03fc19cf70a7feeb7d0003de7fbc7b254a3e9560

3 years agoCollapse some unnecessary else conditions
Reedy [Thu, 20 Sep 2018 23:06:07 +0000 (00:06 +0100)]
Collapse some unnecessary else conditions

Change-Id: I9fe505f2f4ed4d10e13813d9f05127fd6571c874

3 years agoMerge "Ensure parserTests pass even if wiki has wgUsePigLatin enabled"
jenkins-bot [Thu, 20 Sep 2018 23:04:22 +0000 (23:04 +0000)]
Merge "Ensure parserTests pass even if wiki has wgUsePigLatin enabled"

3 years agoMerge "user: Allow "CAS update failed" exceptions to be normalised"
jenkins-bot [Thu, 20 Sep 2018 22:31:11 +0000 (22:31 +0000)]
Merge "user: Allow "CAS update failed" exceptions to be normalised"

3 years agoUpdate HISTORY for 1.27.5/1.29.3/1.30.1/1.31.1
Reedy [Thu, 20 Sep 2018 21:53:49 +0000 (22:53 +0100)]
Update HISTORY for 1.27.5/1.29.3/1.30.1/1.31.1

Bug: T199025
Change-Id: Iaf6b8f32d1c4c21b20483817ad0e9d3dbf3e7e22

3 years agoSECURITY: Don't exclude .htaccess files from `git archive`
Kunal Mehta [Fri, 20 Jul 2018 20:29:14 +0000 (22:29 +0200)]
SECURITY: Don't exclude .htaccess files from `git archive`

Bug: T199029
Change-Id: I7ada3dddc4f5f7f2800882ccc9c73c8494f7fac9

3 years agoSECURITY: Do not allow botpassword login if account locked.
Brian Wolff [Sun, 13 May 2018 19:37:09 +0000 (19:37 +0000)]
SECURITY: Do not allow botpassword login if account locked.

Reported by Rxy

Bug: T194605
Change-Id: Ib41005e69ab4db6f849837de12f0d41398b58f9a

3 years agoSECURITY: Make 'newbie' limit in $wgRateLimits really override 'user' limit
Chad Horohoe [Tue, 13 Mar 2018 18:43:30 +0000 (18:43 +0000)]
SECURITY: Make 'newbie' limit in $wgRateLimits really override 'user' limit

The order of operations was incorrect.

Bug: T169545
Change-Id: Ia910aa2a494914d3b0017daac9ab294ea9fa8705

3 years agoMerge "Soft deprecate non-Remex tidy configurations"
jenkins-bot [Thu, 20 Sep 2018 20:34:31 +0000 (20:34 +0000)]
Merge "Soft deprecate non-Remex tidy configurations"

3 years agoMerge "Hard-deprecate the $wgUseTidy option"
jenkins-bot [Thu, 20 Sep 2018 20:29:00 +0000 (20:29 +0000)]
Merge "Hard-deprecate the $wgUseTidy option"

3 years agoMerge "Use wfIsHHVM() instead of a HipHop-specific environment variable"
jenkins-bot [Thu, 20 Sep 2018 18:19:27 +0000 (18:19 +0000)]
Merge "Use wfIsHHVM() instead of a HipHop-specific environment variable"