lhc/web/wiklou.git
5 years agoFix [[MediaWiki:Config-install-success/en]] translation issues
Zoranzoki21 [Fri, 28 Sep 2018 22:37:09 +0000 (01:37 +0300)]
Fix [[MediaWiki:Config-install-success/en]] translation issues

The first sentence in this message should not be splited in two lines.
Too, content of page for FAQ, should be displayed on the user's language.

Bug: T205753
Change-Id: I7b75485411f6b6022bdc773521fbad1366dd8643

5 years agoDeprecate class LegacyFormatter
Max Semenik [Sat, 29 Sep 2018 00:50:10 +0000 (17:50 -0700)]
Deprecate class LegacyFormatter

No uses anywhere, was used by the now removed function wfErrorLog().

Change-Id: Ib4561157e776c64ab17f014fbd8603b0934acb2c

5 years agoMerge "skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery"
jenkins-bot [Sat, 29 Sep 2018 02:05:51 +0000 (02:05 +0000)]
Merge "skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery"

5 years agoMerge "Document some understanding of MessageCache in RawAction/EditPage"
jenkins-bot [Sat, 29 Sep 2018 02:02:04 +0000 (02:02 +0000)]
Merge "Document some understanding of MessageCache in RawAction/EditPage"

5 years agoMerge "Drop wfErrorLog, deprecated in 1.25"
jenkins-bot [Sat, 29 Sep 2018 01:56:53 +0000 (01:56 +0000)]
Merge "Drop wfErrorLog, deprecated in 1.25"

5 years agoMerge "user: Remove use of Message:text() from User::isUsableName()"
jenkins-bot [Sat, 29 Sep 2018 01:49:05 +0000 (01:49 +0000)]
Merge "user: Remove use of Message:text() from User::isUsableName()"

5 years agoDrop wfErrorLog, deprecated in 1.25
James D. Forrester [Thu, 13 Sep 2018 19:57:14 +0000 (12:57 -0700)]
Drop wfErrorLog, deprecated in 1.25

Change-Id: I29131f3c677ab5747ac0ae5121669af63a1d5bd8

5 years agoskins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery
Timo Tijhof [Thu, 27 Sep 2018 21:23:48 +0000 (22:23 +0100)]
skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery

For several years now, action=raw urls are automatically purged
after edits, and receive the same cache allowance as page views.

The vast majority of action=raw requests come from the
importScript() function in wikibits.js, which only specififes
'title', 'action' and 'ctype'.

The 'usemsgcache' parameter is a relic (pre-2009) for optimising
something we haven't used in a very long time.  Nothing uses the
'usemsgcache' parameter, except for the one edge-case of
third-party wikis loading Filepage.css from Commons on local
file description pages. This commit removes the handling logic,
in favour of letting the normal Revision-logic happen instead,
which is compatible and produces the same response.

Before 2009, this probably made sense as an optimisation because
we didn't have Revision text cache in Memcached yet at that time,
to avoid DB-load from InstantCommons-based file page views.

The way FileRepo was using it needlessly allowed Filepage.css
to return stale responses (given non-canonical query parameters
variations are not purged on-edit). It also caused responses to
be cached longer or shorter than they should be, due to it being
based on the client wiki's configuration, instead of the repo's
configuration (e.g. Wikimedia Commons). By omitting these
'maxage' parameters, the $wgSquidMaxage config of the repo is
used instead, which makes more sense.

Bug: T193271
Change-Id: Ie52195b56b7f8fc17dec0cbedd6d77968e3bc040

5 years agoDocument some understanding of MessageCache in RawAction/EditPage
Timo Tijhof [Thu, 27 Sep 2018 20:34:39 +0000 (21:34 +0100)]
Document some understanding of MessageCache in RawAction/EditPage

Bug: T193271
Change-Id: I8d110dd7b84faf6b1b64553e8088185de5aac7f2

5 years agouser: Remove use of Message:text() from User::isUsableName()
Timo Tijhof [Sat, 29 Sep 2018 01:01:55 +0000 (02:01 +0100)]
user: Remove use of Message:text() from User::isUsableName()

None of the current translations use of "&", "{" or "[", which
presumably means they don't require tranformation. I'd also
very much prefer such dynamic constructs not be added into
this system which would make it rather unpredictable given these
reserved usernames shouldn't change from time to time.

The only match for the below command is qqq.json,

> $ git grep -E '"(double-redirect-fixer|usermessage-editor|\
> proxyblocker|sorbs|spambot.username|autochange-username)"\
> ' | grep -E '[{&[]'

This code was originally introduced with r37928 (5ad5cb4f0a64),
which used wfMsgForContent() and made no explicit mention of
transformation, it just happened to be the default. Later, when
that function was deprecated, it got batch-replaced by
->inContentLanguage()->text().

Bug: T189966
Change-Id: Ia4ddf215e83f15de552f8311b9e737559c72b49a

5 years agoDon't use deprecated function wfArrayFilterByKey()
Max Semenik [Sat, 29 Sep 2018 00:24:13 +0000 (17:24 -0700)]
Don't use deprecated function wfArrayFilterByKey()

Change-Id: Ifdc67f8b9b8617e6398aa0d2b6ff4bec1e7507ce

5 years agoMerge "exception: Add FIXME about code duplication"
jenkins-bot [Fri, 28 Sep 2018 23:01:11 +0000 (23:01 +0000)]
Merge "exception: Add FIXME about code duplication"

5 years agoReplace deprecated use of $wgUseTidy in Special:ExpandTemplates
C. Scott Ananian [Thu, 27 Sep 2018 17:33:13 +0000 (13:33 -0400)]
Replace deprecated use of $wgUseTidy in Special:ExpandTemplates

This use managed to escape my notice in
I2e7d990da1da378eb6e828d4b3c0f5a41791dd92.  Note that $wgUseTidy
has actually been false in production since
Idf246d05d116f63a73105b50a1929a7721fbe7b9.

Bug: T175706
Change-Id: I684be210c6efde5b5eb4dca163d45b2701df7555

5 years agoexception: Add FIXME about code duplication
Timo Tijhof [Fri, 28 Sep 2018 21:44:36 +0000 (22:44 +0100)]
exception: Add FIXME about code duplication

These methods aren't identical, so consolidation isn't
immediately obvious, and creating dependencies is problematic
in error handling code given there is a lot of pressure on this
code to not by itself cause additional errors.

This means that maybe it's best to keep these inlined without
duplication, but at the very least we then need to remember
to keep these in sync. This duplication has been around for
a while now, but documentation can never come too late...

Change-Id: I60160f61c13c8e115d839acce222f110e30bc2f2

5 years agoOnly strip newline in OrderedStreamingForkController
Erik Bernhardson [Fri, 28 Sep 2018 17:58:00 +0000 (10:58 -0700)]
Only strip newline in OrderedStreamingForkController

The controller should pass through lines of input exactly as
they were provided, only stripping the trailing newline that
delimits items. The trim was making `door` and `door ` equivilant
but for the use case in search the distinction is important.

Additionally check that the line is actually empty, don't throw
away inputs like '0' which are falsy.

Change-Id: Ifac910543fdb46a27da021e831e3e18befefcfc5

5 years agoMerge "Handle empty revision table in populateArchiveRevId.php"
jenkins-bot [Fri, 28 Sep 2018 15:58:05 +0000 (15:58 +0000)]
Merge "Handle empty revision table in populateArchiveRevId.php"

5 years agoMerge "Suggest "apcu" not "apc" in composer.json"
jenkins-bot [Fri, 28 Sep 2018 06:12:50 +0000 (06:12 +0000)]
Merge "Suggest "apcu" not "apc" in composer.json"

5 years agoSuggest "apcu" not "apc" in composer.json
Kunal Mehta [Fri, 28 Sep 2018 05:26:16 +0000 (22:26 -0700)]
Suggest "apcu" not "apc" in composer.json

apc is the pre-PHP 5.5 extension that was partly merged into PHP itself
(the opcode caching), and partly split into a separate apcu extension for
the userland caching. We want people to install apcu for better performance.

Note that we still need to support apc because of HHVM.

Change-Id: I5830a66bc86ff321bf9141d2b65eedb4802e404f

5 years agoBitmapMetadataHandlerTest: Don't reinvent $this->checkPHPExtension()
Kunal Mehta [Fri, 28 Sep 2018 05:01:28 +0000 (22:01 -0700)]
BitmapMetadataHandlerTest: Don't reinvent $this->checkPHPExtension()

Change-Id: I4957ca1be698844bafbf8de64af450cb884ec71a

5 years agoexception: Report uncaught "Catchable" fatal to "fatal" channel
Timo Tijhof [Thu, 27 Sep 2018 23:54:39 +0000 (00:54 +0100)]
exception: Report uncaught "Catchable" fatal to "fatal" channel

Things like "Catchable fatal error: Must be X, null given" stop
execution immediately after the error handler callback, and produce
an HTTP 500 Internal Server Error page. They are very fatal.

Per <https://secure.php.net/manual/en/language.errors.php7.php>,
on PHP 7 this results in a TypeError throwable which will
eventually fatal the request and be reported through
set_exception_handler, or be caught by our top-level 'catch'
and artificially forwarded to our set_exception_handler callback.

On HHVM, these fatal error types are PHP5-like in that they
don't have a throwable object to throw yet, instead the error
meta-data is sent directly as parameeters to set_error_handler,
the same as for warnings. We need to intercept them there so
that they are reported correctly.

Sample from PHP 7:

> MediaWiki\Storage\MutableRevisionRecord::newFromParentRevision( null );
> [no req]   TypeError from line 50 of .../MutableRevisionRecord.php:
> Argument 1 passed to ...\MutableRevisionRecord::newFromParentRevision()
> must be an instance of MediaWiki\Storage\RevisionRecord, null given,
> called in /var/www/mediawiki/maintenance/eval.php(78) ...

[exit status: error(255)]

Sample from HHVM:

> MediaWiki\Storage\MutableRevisionRecord::newFromParentRevision( null );
> [hphp] set_error_handler called with:
> ...  $type = 4096 // E_RECOVERABLE_ERROR
>
> [hphp] [...] Catchable fatal error:
> Argument 1 passed to ...\MutableRevisionRecord::newFromParentRevision()
> must be an instance of MediaWiki\Storage\RevisionRecord, null given
> ...

[exit status: error(255)]

Interestingly, if you forget to return false from set_error_handler
for fatal errors on HHVM, it can actually continue execution.

Bug: T205677
Change-Id: I18dd2ff37fa2c2679d0c598cbeff0c61c2fe0253

5 years agoHandle empty revision table in populateArchiveRevId.php
James Montalvo [Mon, 10 Sep 2018 19:45:37 +0000 (14:45 -0500)]
Handle empty revision table in populateArchiveRevId.php

Running update.php for new wikis without any revisions yet fails when
update.php attempts to run populateArchiveRevId.php. This problem
does not exist if using the web installer or running
maintenance/install.php, since both of these generate a Main Page
revision. Manually generating a MediaWiki database by sourcing
maintenance/tables.sql does not generate any revisions, and thus is
susceptible to this problem.

Bug: T203982

Change-Id: Ifd78c50fb1e11f82340cd83a10fa903b7c5fc1e7

5 years agoMerge "exception: Avoid preg_replace for literal swap"
jenkins-bot [Thu, 27 Sep 2018 19:45:41 +0000 (19:45 +0000)]
Merge "exception: Avoid preg_replace for literal swap"

5 years agoAdd basic test cases for OutputPage::addWikiMsg / wrapWikiMsg
C. Scott Ananian [Thu, 27 Sep 2018 15:05:47 +0000 (11:05 -0400)]
Add basic test cases for OutputPage::addWikiMsg / wrapWikiMsg

Change-Id: I621c22f2819b426ce6088ff3bdf1dadca274d1f9

5 years agoMerge "Special:NewFiles - ensure top text is entirely wrapped"
jenkins-bot [Thu, 27 Sep 2018 17:11:12 +0000 (17:11 +0000)]
Merge "Special:NewFiles - ensure top text is entirely wrapped"

5 years agoexception: Avoid preg_replace for literal swap
Timo Tijhof [Thu, 27 Sep 2018 16:04:48 +0000 (17:04 +0100)]
exception: Avoid preg_replace for literal swap

Follows-up bbcbcaba3db9.

Change-Id: Ie7b76c28ba53668d73a8435c4d2ec91757bd2372

5 years agoSpecial:Import - wrap error messages with <div> not <p>
C. Scott Ananian [Thu, 27 Sep 2018 14:16:53 +0000 (10:16 -0400)]
Special:Import - wrap error messages with <div> not <p>

Localized messages are wikitext and can contain `<div>` or `\n\n` which
would break `<p>` wrappers.  Be consistent with the rest of the codebase
and use `<div>` wrappers here.

Bug: T205624
Change-Id: I1e8ff5985f3a7780ad9ba063827c515e997cb508

5 years agoSpecial:NewFiles - ensure top text is entirely wrapped
C. Scott Ananian [Thu, 27 Sep 2018 13:24:15 +0000 (09:24 -0400)]
Special:NewFiles - ensure top text is entirely wrapped

The template on commons for newimagestext has a <div> wrapper,
and trying to wrap a <p> around a <div> doesn't work: the <p> is
implicitly closed by the start of the <div>.  Use a <div> wrapper
to set the content language and directionality instead, which ensures
that it is valid HTML and will be tidied correctly.

In the process, fix an extra argument (and unnecessary optional argument)
passed to OutputPage::addWikiTextTidy in
Ife33ceed39ed01d4e9af18e9108026f341e9b343.

Bug: T205624
Change-Id: I42d198e6d03afd5b976da741f235c175bfe9f767

5 years agoMerge "copyedit patch-parsercache.sql comment"
jenkins-bot [Thu, 27 Sep 2018 00:29:09 +0000 (00:29 +0000)]
Merge "copyedit patch-parsercache.sql comment"

5 years agocopyedit patch-parsercache.sql comment
Reedy [Wed, 26 Sep 2018 21:36:24 +0000 (22:36 +0100)]
copyedit patch-parsercache.sql comment

Change-Id: Ie0a9d9dc11bd6944cabd30952fa836745e3f22b9

5 years agoMerge "Parser: Refactor parsing of [[File:...|link=...]] syntax for reusability"
jenkins-bot [Wed, 26 Sep 2018 19:18:34 +0000 (19:18 +0000)]
Merge "Parser: Refactor parsing of [[File:...|link=...]] syntax for reusability"

5 years agoMerge "Rephrase 'imagemaxsize' message (used on preferences)"
jenkins-bot [Wed, 26 Sep 2018 16:04:45 +0000 (16:04 +0000)]
Merge "Rephrase 'imagemaxsize' message (used on preferences)"

5 years agoRephrase 'imagemaxsize' message (used on preferences)
Bartosz Dziewoński [Wed, 26 Sep 2018 15:34:52 +0000 (17:34 +0200)]
Rephrase 'imagemaxsize' message (used on preferences)

* Remove the forced line break, which is not necessary for old
  preferences page and which makes it worse for the new OOUI
  preferences page
* Remove the italic styling, which is not used by any other
  preferences

Change-Id: Ie80583c82d8e748e063f7d831ebb3bb20dc2b64a

5 years agoMerge "wdio-mediawiki: relative internal lookups"
jenkins-bot [Wed, 26 Sep 2018 15:16:02 +0000 (15:16 +0000)]
Merge "wdio-mediawiki: relative internal lookups"

5 years agoFix double-wrapped HtmlArmor causing fatals
Bartosz Dziewoński [Wed, 26 Sep 2018 13:14:05 +0000 (15:14 +0200)]
Fix double-wrapped HtmlArmor causing fatals

Follow-up to a89ef9b3b9cc4702c0f23443ae51df4f3bed7ecb. I'm guessing
this is supposed to be htmlspecialchars() based on the changes to
other files in that patch (e.g. SpecialAncientpages.php).

Bug: T205469
Change-Id: I52e38a5754b339e1516498e6f0eb73fc8d8df59c

5 years agoMerge "Simplify HTMLTitleTextField::validate"
jenkins-bot [Wed, 26 Sep 2018 13:19:49 +0000 (13:19 +0000)]
Merge "Simplify HTMLTitleTextField::validate"

5 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"

5 years agoParser: Refactor parsing of [[File:...|link=...]] syntax for reusability
Bartosz Dziewoński [Sat, 19 May 2018 13:29:52 +0000 (15:29 +0200)]
Parser: Refactor parsing of [[File:...|link=...]] syntax for reusability

Change-Id: I91467297de4b7c532448a4c20b9a0dc8216c7200

5 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

5 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"

5 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*()"

5 years agowdio-mediawiki: relative internal lookups
Pablo Grass [Wed, 26 Sep 2018 10:36:45 +0000 (12:36 +0200)]
wdio-mediawiki: relative internal lookups

"Internal lookups need to be internal, using ./.
This currently works because it executes as part of mediawiki-core, but
may fail when used from the published package, because there will not
be another "wdio-mediawiki" inside this directory." krinkle
Follow-up to a fixme in Ifc49bc5c06eef71da8aff1b1837c32debc2c45dd

Change-Id: I86f321a42eaf4cf706b4e899e4cd460654840284

5 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"

5 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"

5 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

5 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"

5 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()"

5 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

5 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"

5 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

5 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

5 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

5 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

5 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"

5 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

5 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"

5 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"

5 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()"

5 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

5 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

5 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

5 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

5 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

5 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"

5 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"

5 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

5 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

5 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

5 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)"

5 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"

5 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."

5 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

5 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

5 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

5 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"

5 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"

5 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"

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

5 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"

5 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

5 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

5 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

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

5 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"

5 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

5 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"

5 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

5 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"

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

Change-Id: Ic11e0e6b86557cbffcc5faa54de218b4676b4712

5 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

5 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"

5 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

5 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 "

5 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"

5 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"

5 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"

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

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

Deprecated since 1.28

Change-Id: I793deb8669e353525464ccd840801e5015c545c8

5 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

5 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

5 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