lhc/web/wiklou.git
2 years agoMerge "phan: Removed PhanUndeclaredTypeParameter suppression"
jenkins-bot [Tue, 24 Sep 2019 21:50:36 +0000 (21:50 +0000)]
Merge "phan: Removed PhanUndeclaredTypeParameter suppression"

2 years agoMerge "Improve the top section of Special:Watchlist for small screens"
jenkins-bot [Tue, 24 Sep 2019 21:19:47 +0000 (21:19 +0000)]
Merge "Improve the top section of Special:Watchlist for small screens"

2 years agoMerge "Simplify NewFilesPager::getQueryInfo"
jenkins-bot [Tue, 24 Sep 2019 20:57:34 +0000 (20:57 +0000)]
Merge "Simplify NewFilesPager::getQueryInfo"

2 years agoMerge "resourceloader: Remove "expected error" noise from mw.loader tests"
jenkins-bot [Tue, 24 Sep 2019 20:54:31 +0000 (20:54 +0000)]
Merge "resourceloader: Remove "expected error" noise from mw.loader tests"

2 years agoMerge "Improve documentation of newRevisionsFromBatch()"
jenkins-bot [Tue, 24 Sep 2019 20:25:00 +0000 (20:25 +0000)]
Merge "Improve documentation of newRevisionsFromBatch()"

2 years agoImprove the top section of Special:Watchlist for small screens
Jan Drewniak [Tue, 24 Sep 2019 09:26:20 +0000 (11:26 +0200)]
Improve the top section of Special:Watchlist for small screens

Bug: T225127#5518870
Change-Id: I2d3e2cf27150487190b34cc9b76db9905599e27b

2 years agophan: Removed PhanUndeclaredTypeParameter suppression
Umherirrender [Tue, 24 Sep 2019 19:20:28 +0000 (21:20 +0200)]
phan: Removed PhanUndeclaredTypeParameter suppression

Fixed the non-namespaced WebRequest by adding a backslash

Change-Id: I9f1e3e000d9a512a74f93145cd5e66b1b38ab8b2

2 years agoMerge "LogPager: Add IGNORE INDEX to avoid MariaDB optimizer bug"
jenkins-bot [Tue, 24 Sep 2019 17:41:06 +0000 (17:41 +0000)]
Merge "LogPager: Add IGNORE INDEX to avoid MariaDB optimizer bug"

2 years agoImprove documentation of newRevisionsFromBatch()
daniel [Tue, 24 Sep 2019 17:18:08 +0000 (19:18 +0200)]
Improve documentation of newRevisionsFromBatch()

Document purpose and behavior of the $title parameter.

Bug: T228988
Change-Id: I89966321ec3b4feb5a59e06b8a656d76c4bd9ef2

2 years agoresourceloader: Remove "expected error" noise from mw.loader tests
Timo Tijhof [Tue, 24 Sep 2019 16:42:42 +0000 (17:42 +0100)]
resourceloader: Remove "expected error" noise from mw.loader tests

After commit bbded40a2b26c, the stub for mw.track no longer worked
as originally intended, causing the stack traces to be printed
to the Karma output and browser console again.

The test still passed because mw.trackError calls mw.track, but
it no longer stubbed out the trace logging noise.

Also simplify some assertion messages while at it, these are meant
to describe the subject (the compared value) not be the value
itself (which is the second param) and not the error message
(which QUnit produces).

Change-Id: I657bf4479a40e1b73b45426df98882aed32b4cba

2 years agoLogPager: Add IGNORE INDEX to avoid MariaDB optimizer bug
Brad Jorsch [Fri, 20 Sep 2019 19:38:52 +0000 (15:38 -0400)]
LogPager: Add IGNORE INDEX to avoid MariaDB optimizer bug

This is basically the same thing we fixed for ApiQueryLogEvents in
I16dba2158.

Bug: T223151
Change-Id: I53a7ed59de3eed2b0b4f1b1fb7f6d302b1de276c

2 years agoMark $wgMainPageIsDomainRoot as experimental
Niklas Laxström [Tue, 24 Sep 2019 06:53:19 +0000 (08:53 +0200)]
Mark $wgMainPageIsDomainRoot as experimental

Change-Id: I328c1022aec8918cbc5b4ee50de3d1dbe5586cfd

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Tue, 24 Sep 2019 06:27:32 +0000 (08:27 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ie40b3da759701a2eb31d05a3230b547d5182c24a

2 years agoMerge "resourceloader: Reduce severity of unknown page module warning"
jenkins-bot [Tue, 24 Sep 2019 00:56:30 +0000 (00:56 +0000)]
Merge "resourceloader: Reduce severity of unknown page module warning"

2 years agoMerge "resourceloader: Remove redundant closure of some startup and base files"
jenkins-bot [Tue, 24 Sep 2019 00:56:22 +0000 (00:56 +0000)]
Merge "resourceloader: Remove redundant closure of some startup and base files"

2 years agoresourceloader: Reduce severity of unknown page module warning
Timo Tijhof [Mon, 23 Sep 2019 23:47:18 +0000 (00:47 +0100)]
resourceloader: Reduce severity of unknown page module warning

These are silently skipped and generally no cause for alarm.
For example, when enabling a gadget by default and then
disabling/deleting it, cached HTML will still have it queued,
which is silently skipped and the other queued modules are loaded
just fine.

The same for when merging module bundles where the destination
is already loaded, in such case it is tolerated to let cached
ParserOutput objects still queuing it silently skip it.
Keeping it existent just to avoid a warning isn't particularly
useful and might even obscure problems or give the illusion that
it is still working and providing compatibility (e.g. loading the
new code), which might not be true.

The silent skipping of modules originally did not have any
logging or warning attached to it, it was silent from 2010
to April 2019. In 2017, commit 37df741514 adds a console warning
when a circular dependency is detected.

In April 2019, commit d059dffa2 optimised away this redundant
silent skipping of unknown modules, in favour of re-using the
code for circular dep detection, which did the same thing already,
but with a debug warning. This meant it now showed scary stack
traces when all there's only an stale module ref, which are normal
in RL and generaly nothing to worry about. This was amplified
by Minerva's tracking of client-side errors going beyond just
'global.error' but also listerning to recoverable internal errors
from 'resourceloader.exception', which now included these
debug warnings.

Change-Id: Ie71adbe18e8dbeb661ddb9d7d3d1d0897891d515

2 years agoresourceloader: Remove redundant closure of some startup and base files
Timo Tijhof [Tue, 24 Sep 2019 00:09:04 +0000 (01:09 +0100)]
resourceloader: Remove redundant closure of some startup and base files

* errorLogger: Contains only top-level assignments and statements,
  no scope needed. If it does need a scope at some point, then it
  should be converted to packageFiles first so that the closure
  still isn't needed (see T50886).

* requestIdleCallback: This file should do nothing in modern browsers,
  except alias a native method, and expose the fallback for testing.
  Remove the closure and with it the (usually) unused local var.

* mediawiki.js: Use the shorter Object.hasOwnProperty instead,
  we already do this in several files. Both provide a quick reference
  to the native method. Object.prototype.hasOwnProperty is more direct
  visually, but also less direct at run-time (3 lookups instead of 2).
  MW does not support environments that extend native classes such as
  Object or their prototypes, so this makes no difference in that
  regard and is already done in several core files. (More wide changes
  to be done separately).

Change-Id: I98ed4da4807c54254669053cef47a3e67b4ad2cf

2 years agoMerge "Fix type for timeout and connectTimeout in HttpRequestFactory::create"
jenkins-bot [Mon, 23 Sep 2019 20:11:36 +0000 (20:11 +0000)]
Merge "Fix type for timeout and connectTimeout in HttpRequestFactory::create"

2 years agoAmend expanded HTMLForm legend styling
Volker E [Mon, 23 Sep 2019 19:08:21 +0000 (12:08 -0700)]
Amend expanded HTMLForm legend styling

Follow-up to I6964296bc68705 providing same top and bottom padding
when expanded.

Change-Id: Ib69f730f9fa713bc8a6d7bf0fdbb7a6d26b1f0ab

2 years agoFix type for timeout and connectTimeout in HttpRequestFactory::create
Umherirrender [Sun, 22 Sep 2019 19:29:12 +0000 (21:29 +0200)]
Fix type for timeout and connectTimeout in HttpRequestFactory::create

Both can have a string 'default'

Change-Id: I9c49cf7db762f251b010bc5469d4c1b4a7797f45

2 years agoImprove collapsible HTMLForm styling (and accessibility, slightly)
Bartosz Dziewoński [Tue, 28 May 2019 22:22:18 +0000 (00:22 +0200)]
Improve collapsible HTMLForm styling (and accessibility, slightly)

Previously the form was only collapsible/expandable using the small
link-button on the far right. Now you can click on the entire header
to do it, and it has an appropriate pretty icon.

We add appropriate ARIA `role` and textual labels. Together with
recently added `toggleARIA` option of jquery.makeCollapsible in
Ic457bda58e56f we feature a screen reader workable output.

Bug: T222904
Change-Id: I6964296bc6870550478de662d21f12a1fc084c15

2 years agoMerge "Remove Revision::getRevisionText from migrateArchiveText"
jenkins-bot [Mon, 23 Sep 2019 17:01:47 +0000 (17:01 +0000)]
Merge "Remove Revision::getRevisionText from migrateArchiveText"

2 years agoMerge "site: Make getPageUrl consistently return null"
jenkins-bot [Mon, 23 Sep 2019 16:36:32 +0000 (16:36 +0000)]
Merge "site: Make getPageUrl consistently return null"

2 years agoMerge "Add config for serving main Page from the domain root"
jenkins-bot [Mon, 23 Sep 2019 15:28:03 +0000 (15:28 +0000)]
Merge "Add config for serving main Page from the domain root"

2 years agoMerge "FauxRequest: don’t override getValues()"
jenkins-bot [Mon, 23 Sep 2019 12:30:46 +0000 (12:30 +0000)]
Merge "FauxRequest: don’t override getValues()"

2 years agoAdd config for serving main Page from the domain root
Amir Sarabadani [Mon, 1 Jul 2019 23:25:01 +0000 (01:25 +0200)]
Add config for serving main Page from the domain root

Bug: T120085
Change-Id: If2d82340ec58888a0bac96924ab63456b6d480fb

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Mon, 23 Sep 2019 06:24:36 +0000 (08:24 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I0c47f67f860aae41d794a2c4ec4d22527de83328

2 years agoPHPVersionCheck: Consistently use double quotes for HTML attributes
Fomafix [Sun, 22 Sep 2019 10:19:59 +0000 (12:19 +0200)]
PHPVersionCheck: Consistently use double quotes for HTML attributes

Change-Id: I6130d12b34ee4dc5e5896c7fa6a7bc14b1ed9893

2 years agoPass language to Status::getWikiText
Umherirrender [Tue, 18 Sep 2018 20:01:56 +0000 (22:01 +0200)]
Pass language to Status::getWikiText

Avoid use of $wgLang

Change-Id: I9cd633a20c5c60e56a101a9a699eea6db8b8eef0

2 years agoSimplify NewFilesPager::getQueryInfo
Umherirrender [Mon, 19 Aug 2019 19:57:32 +0000 (21:57 +0200)]
Simplify NewFilesPager::getQueryInfo

The query here is not used for the images to display, so the query must
not include all columns from the images table, because that is not used

The gallery itself will load the necessary information for the display
in separate queries

Bug: T227608
Change-Id: I70b0d1bcdc155c38d69b5dd52bf4e3898920ab76

2 years agoMerge "localisation: Remove PHP5-specific perf optimisation"
jenkins-bot [Sat, 21 Sep 2019 03:29:49 +0000 (03:29 +0000)]
Merge "localisation: Remove PHP5-specific perf optimisation"

2 years agoMerge "jquery.makeCollapsible: Add toggleARIA option and enable for plain toggle"
jenkins-bot [Sat, 21 Sep 2019 03:06:27 +0000 (03:06 +0000)]
Merge "jquery.makeCollapsible: Add toggleARIA option and enable for plain toggle"

2 years agojquery.makeCollapsible: Add toggleARIA option and enable for plain toggle
Volker E [Fri, 20 Sep 2019 03:14:46 +0000 (20:14 -0700)]
jquery.makeCollapsible: Add toggleARIA option and enable for plain toggle

Adding `aria-expanded` attributes to `$toggle`.
That is not resolving each and every issue, but it gives at least
a valuable hint for screen readers and resolves the situation for
togglers, where the toggled content comes directly after `$toggle`.

Bug: T222904
Change-Id: Ic457bda58e56fb9ba2dce6df195e9fb48afb07f6

2 years agolocalisation: Remove PHP5-specific perf optimisation
Timo Tijhof [Sat, 21 Sep 2019 01:31:04 +0000 (02:31 +0100)]
localisation: Remove PHP5-specific perf optimisation

The `apc.cache_by_default` setting is a PHP5-era setting relating
to the part of php5-apc now known as opcache (as opposed to the
part now known as apcu).

This setting doesn't exist in PHP 7, and trying to set it doesn't
do anything useful.

Bug: T206986
Change-Id: I46a91897b2b33b5ce6505beb74d404982cb0641c

2 years agoMerge "Messages collected above the form are meant to live as boxed messages"
jenkins-bot [Fri, 20 Sep 2019 23:33:04 +0000 (23:33 +0000)]
Merge "Messages collected above the form are meant to live as boxed messages"

2 years agoMerge "Remove `inline-block` from message boxes"
jenkins-bot [Fri, 20 Sep 2019 23:18:09 +0000 (23:18 +0000)]
Merge "Remove `inline-block` from message boxes"

2 years agoMerge "Use mw.util.getUrl( null ) to get the default mw.config.get( 'wgPageName' )"
jenkins-bot [Fri, 20 Sep 2019 23:01:10 +0000 (23:01 +0000)]
Merge "Use mw.util.getUrl( null ) to get the default mw.config.get( 'wgPageName' )"

2 years agoMerge "HTMLTitleTextField: Remove incorrect check for unsubmitted GET forms"
jenkins-bot [Fri, 20 Sep 2019 22:45:24 +0000 (22:45 +0000)]
Merge "HTMLTitleTextField: Remove incorrect check for unsubmitted GET forms"

2 years agoRemove `inline-block` from message boxes
Volker E [Thu, 19 Sep 2019 20:51:58 +0000 (13:51 -0700)]
Remove `inline-block` from message boxes

Removing `inline-block` from message boxes as they're outlined as
block level elements in UI standardization work.
Back in Ibb9371eec in 2013 those were used in various contexts and
tried to resolve the back then stated need of intrinsic width by
`inline-block`. That doesn't seem to be appropriate for the general
use case any more.
If used in other contexts or on inline elements, product owners and
implementors need to act on specifically adapting them.

Bug: T233359
Change-Id: I530fda47b3d7b99f782b421abbde8957026570cd

2 years agoMerge "Do not output wikitext in maintenance script"
jenkins-bot [Fri, 20 Sep 2019 21:07:20 +0000 (21:07 +0000)]
Merge "Do not output wikitext in maintenance script"

2 years agoMerge "Gallery: Don't fire wikipage.content hook twice during init"
jenkins-bot [Fri, 20 Sep 2019 19:59:53 +0000 (19:59 +0000)]
Merge "Gallery: Don't fire wikipage.content hook twice during init"

2 years agoRemove Revision::getRevisionText from migrateArchiveText
Petr Pchelko [Thu, 19 Sep 2019 17:53:19 +0000 (10:53 -0700)]
Remove Revision::getRevisionText from migrateArchiveText

The script is used to migrate archive text from pre-1.5 schema.
It's safe it just use the `ar_text` field directly instead of going
to Revision::getRevisionText since migrating this field is the whole
proing of the script. Per execution it checks that the field exists
in the schema, the SQL query reads the field.

We don't need to do `expandBlob` either, cause we already know that
the data is not in external store, thus Revision::decompressData
is enough.

Bug: T198343
Change-Id: Ic838bdf680d73522dd508dd86056eb945535b368

2 years agoMerge "selenium: Only load 'sauce' service when needed"
jenkins-bot [Fri, 20 Sep 2019 18:53:04 +0000 (18:53 +0000)]
Merge "selenium: Only load 'sauce' service when needed"

2 years agoselenium: Only load 'sauce' service when needed
Timo Tijhof [Fri, 20 Sep 2019 17:52:20 +0000 (18:52 +0100)]
selenium: Only load 'sauce' service when needed

Also, remove the redundant unprefixed `user` and `key` options.
These would be cleaner to set through `sauceConnectOpts`
as `sauceConnectOpts { username: …, accesskey: … }`, but even
that isn't needed because wdio-sauce-service already reads these
same environment variables directly. No further config needed.

Also remove the duplication of default variables we don't have
any particular preference for yet so that enjoy improvements to
these when upgrading.

Change-Id: I0d4802f83509b0b49f775560b508d9929ae9979e

2 years agoMerge "Mark consistently with any edit summaries"
jenkins-bot [Fri, 20 Sep 2019 17:45:07 +0000 (17:45 +0000)]
Merge "Mark consistently with any edit summaries"

2 years agoDo not output wikitext in maintenance script
Umherirrender [Mon, 19 Aug 2019 16:12:32 +0000 (18:12 +0200)]
Do not output wikitext in maintenance script

Also remove print_r with a string
Always use english for maintenance scripts

Bug: T229843
Change-Id: I539a1ac1f6a201dd8ee9ce89599cc34bebfba79f

2 years agoMerge "filebackend: reduce hashing I/O in SwiftFileBackend::doStoreInternal()"
jenkins-bot [Fri, 20 Sep 2019 16:12:25 +0000 (16:12 +0000)]
Merge "filebackend: reduce hashing I/O in SwiftFileBackend::doStoreInternal()"

2 years agoMerge "tests: Prefer PHPUnit's assertSame() when comparing empty strings"
jenkins-bot [Fri, 20 Sep 2019 15:55:08 +0000 (15:55 +0000)]
Merge "tests: Prefer PHPUnit's assertSame() when comparing empty strings"

2 years agoMerge "tests: Prefer assertSame() when comparing the integer 0"
jenkins-bot [Fri, 20 Sep 2019 15:33:02 +0000 (15:33 +0000)]
Merge "tests: Prefer assertSame() when comparing the integer 0"

2 years agotests: Prefer PHPUnit's assertSame() when comparing empty strings
Thiemo Kreuz [Tue, 17 Sep 2019 14:28:35 +0000 (16:28 +0200)]
tests: Prefer PHPUnit's assertSame() when comparing empty strings

assertSame() is guaranteed to never do any magic type conversion.
This can be critical when accidentially comparing empty strings (a
value PHP considers to be "falsy") to false, 0, 0.0, null, and such.

Change-Id: I2e2685c5992cae252f629a68ffe1a049f2e5ed1b

2 years agoGallery: Don't fire wikipage.content hook twice during init
Ed Sanders [Fri, 20 Sep 2019 12:22:04 +0000 (13:22 +0100)]
Gallery: Don't fire wikipage.content hook twice during init

We know the hook has already been fired once, because we listen
to it to start the gallery.

Firing it again here can cause other listeners to fail as only
the last-fired argument is stored.

Bug: T233401
Change-Id: I32ca866964c7a1f644a3cc28d636ec1430b8ef58

2 years agoMerge "Refactor MediaWikiIntegrationTestCase::resetDB() for readability"
jenkins-bot [Fri, 20 Sep 2019 12:05:18 +0000 (12:05 +0000)]
Merge "Refactor MediaWikiIntegrationTestCase::resetDB() for readability"

2 years agoMerge "phan: Enable PhanTypeMismatchArgument issue"
jenkins-bot [Fri, 20 Sep 2019 10:38:52 +0000 (10:38 +0000)]
Merge "phan: Enable PhanTypeMismatchArgument issue"

2 years agoMerge "Fix namespace handling on Special:PagesWithProp"
jenkins-bot [Fri, 20 Sep 2019 10:32:31 +0000 (10:32 +0000)]
Merge "Fix namespace handling on Special:PagesWithProp"

2 years agoFix namespace handling on Special:PagesWithProp
Matěj Suchánek [Fri, 20 Sep 2019 09:41:58 +0000 (11:41 +0200)]
Fix namespace handling on Special:PagesWithProp

Firstly, restore the availability to query all namespaces.
There is no reason to remove this feature.

Secondly, fix code not to treat '0' as falsy. Instead, use
the request object to get an integer or null.

Bug: T50247
Change-Id: I182e25be2d694d010a1e8382a461c5c08f898581

2 years agoMerge "Use BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch"
jenkins-bot [Fri, 20 Sep 2019 09:39:17 +0000 (09:39 +0000)]
Merge "Use BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch"

2 years agoMerge "import: Update docs about WikiRevision requiring a Config"
jenkins-bot [Fri, 20 Sep 2019 08:19:34 +0000 (08:19 +0000)]
Merge "import: Update docs about WikiRevision requiring a Config"

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Fri, 20 Sep 2019 06:22:19 +0000 (08:22 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: I66ff316a7d099f45e0cff71b7281117ea12a7db0

2 years agoMark consistently with any edit summaries
Volker E [Fri, 20 Sep 2019 01:06:48 +0000 (18:06 -0700)]
Mark consistently with any edit summaries

Marking with `.comment` to be consistent with `Linker:commentBlock`.

Change-Id: Idba91bd3d1345aa18da6745ad86f1bac2628dae7

2 years agoMerge "Log entries can be rendered with parentheses in HTML"
jenkins-bot [Fri, 20 Sep 2019 00:22:16 +0000 (00:22 +0000)]
Merge "Log entries can be rendered with parentheses in HTML"

2 years agoMessages collected above the form are meant to live as boxed messages
Volker E [Thu, 19 Sep 2019 20:36:48 +0000 (13:36 -0700)]
Messages collected above the form are meant to live as boxed messages

Also removing HTMLForm/VForm `.error` and `.warning` classes from
'forms.less'.

Bug: T233362
Change-Id: I4f8d8f228ab07253a7df24470791c26e39bc311a

2 years agoMerge "title: Improve docs of get*URL()"
jenkins-bot [Thu, 19 Sep 2019 20:26:45 +0000 (20:26 +0000)]
Merge "title: Improve docs of get*URL()"

2 years agoMerge "LogPager: separate getter from query filter"
jenkins-bot [Thu, 19 Sep 2019 19:07:34 +0000 (19:07 +0000)]
Merge "LogPager: separate getter from query filter"

2 years agoMerge "Add assertFileContains to MediaWikiTestCaseTrait"
jenkins-bot [Thu, 19 Sep 2019 18:52:09 +0000 (18:52 +0000)]
Merge "Add assertFileContains to MediaWikiTestCaseTrait"

2 years agoUse mw.util.getUrl( null ) to get the default mw.config.get( 'wgPageName' )
Fomafix [Thu, 19 Sep 2019 18:39:57 +0000 (20:39 +0200)]
Use mw.util.getUrl( null ) to get the default mw.config.get( 'wgPageName' )

Change-Id: If802b23285762b0eb0d01eba7fd52761dcf9fb86

2 years agoLogPager: separate getter from query filter
Matěj Suchánek [Fri, 13 Sep 2019 17:40:13 +0000 (19:40 +0200)]
LogPager: separate getter from query filter

The method LogPager::getFilterParams combines data aggregation and query
modification which is problematic: it starts with "get" and is public
but has a side-effect. Instead, make a dedicated private method for
building the query and remove the side-effect.

The new private method is now dedicated to building the query, and so
it can also make sure whether selection by log id is requested. If it's
the case, it won't filter the log types out (fix for T220834).

Also remove redundant comment: it's irrelevant to require callers to
call a private method.

Bug: T220834
Change-Id: I0fb6e6ee30ac626192cdf4ef920a731c03b2732f

2 years agophan: Enable PhanTypeMismatchArgument issue
Umherirrender [Tue, 18 Jun 2019 20:26:00 +0000 (22:26 +0200)]
phan: Enable PhanTypeMismatchArgument issue

Bug: T231636
Depends-On: I5de4f8f32a47c3f41c990ffe2ebd091fc23d1a58
Change-Id: I34d65fe3ff1916f2af675f0b1f19641b0cdfadc0

2 years agoMerge "export: Align docs of close(Rename/Reopen) methods"
jenkins-bot [Thu, 19 Sep 2019 17:52:57 +0000 (17:52 +0000)]
Merge "export: Align docs of close(Rename/Reopen) methods"

2 years agotitle: Improve docs of get*URL()
Daimona Eaytoy [Sun, 15 Sep 2019 08:54:13 +0000 (10:54 +0200)]
title: Improve docs of get*URL()

These functions call fixUrlQueryArgs, which in turns uses wfArrayToCgi,
which can handle array values. Hence, array[] is also valid.

Replace string[] with array, as the values may also be integers.

Change-Id: I5de4f8f32a47c3f41c990ffe2ebd091fc23d1a58

2 years agoexport: Align docs of close(Rename/Reopen) methods
Daimona Eaytoy [Sun, 15 Sep 2019 09:10:29 +0000 (11:10 +0200)]
export: Align docs of close(Rename/Reopen) methods

The base implementation says it can accept an array with a single
element, but the subclasses only had `string` in the docblock (although
they could handle the array case). Hence, replace docblocks in
subclasses with @inheritDoc to copy the parent description and avoid
such discrepancies in the future.

Plus, change `array` to `string[]` for better type inference.

Change-Id: Ica9929fd50f31d8d5f0e29f7c60364086ea39ae5

2 years agodocs: Avoid some scalar juggling
Daimona Eaytoy [Sun, 15 Sep 2019 14:40:42 +0000 (16:40 +0200)]
docs: Avoid some scalar juggling

Phan can treat scalar types as non-interchangeable with
`scalar_implicit_cast` set to false. This patch fixes some of those
issues (which are in total >1000), namely the ones with alphabetic order
< includes/actions.

Change-Id: Ib1c6573ab899088bc319b9da9ceaffc850da3dbe

2 years agoUse BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch
Petr Pchelko [Wed, 18 Sep 2019 00:25:43 +0000 (17:25 -0700)]
Use BlobStore::getBlobBatch for RevisionStore::newRevisionsFromBatch

Bug: T233173
Change-Id: I3ffcfabc3524ce137593e0dba32c83f5eb7e5763

2 years agoFix using null for a non-nullable argument
Daimona Eaytoy [Sun, 15 Sep 2019 13:53:14 +0000 (15:53 +0200)]
Fix using null for a non-nullable argument

These are reported by phan as PhanTypeMismatchArgumentNullableInternal
when null_casts_as_any_type is disabled.

Change-Id: I85076ee31c1bfc59a19600e84da0d915e425890a

2 years agoMerge "Remove Revision::getRevisionText from ApiQueryDeletedrevs"
jenkins-bot [Thu, 19 Sep 2019 16:47:51 +0000 (16:47 +0000)]
Merge "Remove Revision::getRevisionText from ApiQueryDeletedrevs"

2 years agoMerge "Sync up with Parsoid parserTests.txt"
jenkins-bot [Thu, 19 Sep 2019 16:05:24 +0000 (16:05 +0000)]
Merge "Sync up with Parsoid parserTests.txt"

2 years agoRemove Revision::getRevisionText from ApiQueryDeletedrevs
Petr Pchelko [Wed, 18 Sep 2019 21:23:09 +0000 (14:23 -0700)]
Remove Revision::getRevisionText from ApiQueryDeletedrevs

This module is deprecated and is scheduled to be removed in T221869
but in order to unblock MCR work we can still remove the method call.

Bug: T198343
Change-Id: I4aed8aa0dedc7284925ce9ba48db71e6ca2db5f0

2 years agoRefactor MediaWikiIntegrationTestCase::resetDB() for readability
Thiemo Kreuz [Fri, 13 Sep 2019 09:47:00 +0000 (11:47 +0200)]
Refactor MediaWikiIntegrationTestCase::resetDB() for readability

This was inspired by I1b2a6eb. As far as I can tell this patch does not
change anything in terms of behavior. My main motivation was to get rid
of the (possibly confusing) duplications, and turn them into a loop.

The special case where TestUserRegistry::clear() is executed appears like
it might not do the exact same as before, but I'm pretty sure it does.
Before, the special case was executed whenever any of the user tables was
present in the $tablesUsed array originally passed to the method. The
same still happens.

Additional changes:
* Strict type hints in the method signature.

Change-Id: I7f292095c0dac99b9cc0b0aa5ce10703f24f8bba

2 years agotests: Prefer assertSame() when comparing the integer 0
Thiemo Kreuz [Tue, 17 Sep 2019 14:31:49 +0000 (16:31 +0200)]
tests: Prefer assertSame() when comparing the integer 0

assertSame() is guaranteed to not do any type conversion. This can be
critical when acciden tially comparing, for example, 0 to 0.0.

Change-Id: Iffcc9bda69573623ba14af655dcd697d0fcce525

2 years agoMerge "Document that services don't normally vary by global state"
jenkins-bot [Thu, 19 Sep 2019 12:11:38 +0000 (12:11 +0000)]
Merge "Document that services don't normally vary by global state"

2 years agoDocument that services don't normally vary by global state
Thalia [Tue, 27 Aug 2019 16:49:36 +0000 (17:49 +0100)]
Document that services don't normally vary by global state

To avoid confusion about passing global state via ServiceWiring.php,
document that cases where this is happening are an exception.

Change-Id: I3b590a816d309b5c7dee08a5baa9b418fb698e56

2 years agoMerge "Update remex-html library to 2.1.0"
jenkins-bot [Thu, 19 Sep 2019 11:34:14 +0000 (11:34 +0000)]
Merge "Update remex-html library to 2.1.0"

2 years agoUpdate remex-html library to 2.1.0
C. Scott Ananian [Wed, 18 Sep 2019 16:22:55 +0000 (12:22 -0400)]
Update remex-html library to 2.1.0

This fixes a lingering incompatibility with PHP 7.4.

Bug: T233012
Bug: T233062
Depends-On: I569cffadcde7a2db36a970cf21da9909d7650cf6
Change-Id: I9939c8697a5c4bbe1694a0e9be22b9efa782f027

2 years agotests: Make SpecialPageDataTest independend from the language
Thiemo Kreuz [Thu, 19 Sep 2019 10:51:54 +0000 (12:51 +0200)]
tests: Make SpecialPageDataTest independend from the language

Required for I67632cc.

Change-Id: Ib1d135a52756939da3c63dfabfe971ed708e8734

2 years agoMerge "generatePhpCharToUpperMappings: Die if fopen fails"
jenkins-bot [Thu, 19 Sep 2019 08:19:53 +0000 (08:19 +0000)]
Merge "generatePhpCharToUpperMappings: Die if fopen fails"

2 years agoMerge "Localisation updates from https://translatewiki.net."
jenkins-bot [Thu, 19 Sep 2019 08:19:47 +0000 (08:19 +0000)]
Merge "Localisation updates from https://translatewiki.net."

2 years agoMerge "StringUtils: Add a utility for checking if a string is a valid regex"
jenkins-bot [Thu, 19 Sep 2019 08:03:33 +0000 (08:03 +0000)]
Merge "StringUtils: Add a utility for checking if a string is a valid regex"

2 years agogeneratePhpCharToUpperMappings: Die if fopen fails
Fomafix [Wed, 18 Sep 2019 19:46:42 +0000 (21:46 +0200)]
generatePhpCharToUpperMappings: Die if fopen fails

This prevents additional errors in the following code.

Change-Id: I27770e6ca09c495ec7b6cb588c251b4014697bfe

2 years agoLocalisation updates from https://translatewiki.net.
Translation updater bot [Thu, 19 Sep 2019 06:48:24 +0000 (08:48 +0200)]
Localisation updates from https://translatewiki.net.

Change-Id: Ia5a76e28cc8a824370748cc719ad76dd7f9f0d02

2 years agoLog entries can be rendered with parentheses in HTML
jdlrobson [Tue, 26 Mar 2019 23:58:19 +0000 (16:58 -0700)]
Log entries can be rendered with parentheses in HTML

Entries such as "User creation log" on Special:RecentChanges can
be wrapped or not wrapped in parentheses

Bug: T219348
Change-Id: Ic764081497dbe8d6d9e5bff6f8a1ceeac4b306e2

2 years agoSync up with Parsoid parserTests.txt
C. Scott Ananian [Wed, 18 Sep 2019 23:45:58 +0000 (19:45 -0400)]
Sync up with Parsoid parserTests.txt

This now aligns with Parsoid commit 4d7cacfedc69ecac6e65f8d62f54583b900a54d2

Change-Id: I14d74032d09da1c6abf478e058e67c4040c1fcd0

2 years agoMake purgeList.php use getCdnUrls()
Gilles Dubuc [Wed, 18 Sep 2019 20:36:26 +0000 (22:36 +0200)]
Make purgeList.php use getCdnUrls()

Bug: T233095
Change-Id: I8c1d3f273ff2d81b9f28403136f4a6e4c3311724

2 years agoMerge "Remove unused `.success-box` class"
jenkins-bot [Wed, 18 Sep 2019 20:21:11 +0000 (20:21 +0000)]
Merge "Remove unused `.success-box` class"

2 years agoAPI: Use ApiBlockInfoTrait in ApiQueryUsers and AllUsers
Brad Jorsch [Thu, 5 Sep 2019 18:24:28 +0000 (14:24 -0400)]
API: Use ApiBlockInfoTrait in ApiQueryUsers and AllUsers

For efficient bulk querying, this means that
ApiQueryBase::showHiddenUsersAddBlockInfo() needs to return everything
needed by DatabaseBlock::newFromRow().

Since we're rewriting it anyway, we may as well also move
ApiQueryBase::showHiddenUsersAddBlockInfo() out into a trait of its own.

Bug: T232021
Change-Id: I9c5b17a232ecbfbffefc7e40608cf5684ce8a644

2 years agoMerge "Remove redundant 'jquery.accessKeylabel' module alias"
jenkins-bot [Wed, 18 Sep 2019 19:02:59 +0000 (19:02 +0000)]
Merge "Remove redundant 'jquery.accessKeylabel' module alias"

2 years agoMerge "Remove unused localisation messages for old edit toolbar"
jenkins-bot [Wed, 18 Sep 2019 19:01:35 +0000 (19:01 +0000)]
Merge "Remove unused localisation messages for old edit toolbar"

2 years agoRemove redundant 'jquery.accessKeylabel' module alias
Timo Tijhof [Wed, 18 Sep 2019 18:37:03 +0000 (19:37 +0100)]
Remove redundant 'jquery.accessKeylabel' module alias

Follows-up f168493b57. This isn't actually used anywhere so might
as well remove right away like we did with some of the other
modules we combined this release.

Change-Id: I6267db732e9835d9dba5cf32d2c6743461f7cb35

2 years agoMerge "wdio-mediawiki: release 0.5.0"
jenkins-bot [Wed, 18 Sep 2019 16:31:56 +0000 (16:31 +0000)]
Merge "wdio-mediawiki: release 0.5.0"

2 years agowdio-mediawiki: release 0.5.0
Lucas Werkmeister [Tue, 17 Sep 2019 16:10:34 +0000 (18:10 +0200)]
wdio-mediawiki: release 0.5.0

Change-Id: Ib6bfcb18aed1ea24753ea8e2e15796c9fff84cf0

2 years agoMobile friendly styling of Special:ListFiles
jdlrobson [Wed, 11 Sep 2019 21:31:56 +0000 (14:31 -0700)]
Mobile friendly styling of Special:ListFiles

This makes core's Special:ListFiles match the styling of
Special:Uploads that is provided by MobileFrontend. The latter
can be removed once this change is incorporated.

The tablet/desktop mode of this page is not impacted except
that the title will be context aware when a username is selected
to show "Uploads by <username>" rather than the generic "list files".

Bug: T102139
Change-Id: I266313b8c71bdf410d336e020aca7dabbe115be5

2 years agoRemove unused localisation messages for old edit toolbar
Bartosz Dziewoński [Wed, 28 Aug 2019 10:33:50 +0000 (12:33 +0200)]
Remove unused localisation messages for old edit toolbar

Not used since cfa70ea6d003ae69d52aad67a543912449c71e00. Also not used
by any extensions (WikiEditor and VisualEditor have their own messages).

The message 'sig-text' used to also be part of the old edit toolbar,
but it is currently still used by WikiEditor.

Bug: T224429
Change-Id: I342351aaa2c69b5a7dde865edd38f1f2f94cfb8c