Commit graph

100804 commits

Author SHA1 Message Date
Petr Pchelko
900c6663b0 Enhance GroupPermissionsLookup and use it.
Added new methods:
- ::getGroupsWithAnyPermissions
- ::getGroupsWithAllPermissions
- ::groupHasAnyPermission
- ::groupHasAllPermission

Replaced relevant calls to PermissionManager with
calls to GroupPermissionsLookup.

Bug: T254537
Change-Id: I0b9c3352c5bebc94e1649239fe0527144e7c2eb2
2021-01-11 11:05:54 -06:00
Adam Wight
68c3154cb9 Enable VisualEditor newwikitext mode in CI
This allows browser tests to access the "new wikitext" mode, but
should not affect any tests which don't explicitly enable the
associated beta preference.

Bug: T270240
Change-Id: I2ba889e1a5dd03549d8d7cb00678a30882ff03fe
2021-01-11 12:44:10 +00:00
Translation updater bot
90996aa040 Localisation updates from https://translatewiki.net.
Change-Id: I946707d4cd3c0bdf104e152ee73e0910542f69ea
2021-01-11 08:32:44 +01:00
jenkins-bot
7eece85d1c Merge "Rephrase message "clearyourcache" for Opera" 2021-01-10 18:58:11 +00:00
Raymond
f42e5235c6 Rephrase message "clearyourcache" for Opera
Source: https://www.opera.com/case-studies/working-faster-with-keyboard-shortcuts-in-opera

Suggestion by jhertel@translatewiki:
https://translatewiki.net/wiki/Support#Reloading_without_cache_in_Opera_58479

Change-Id: I87d077f9a59faf815679aaf6f5a4952bd7e4eb55
2021-01-10 11:16:06 +01:00
Yuki Shira
89f8e3126a DefaultSettings: Improve custom folding and grouping
This restores commit: "Improve custom folding and grouping"
I7d819fdb376c861f40bfc01aed74cd3706141b20 (9af96ef4c7)
by partially reverting the following revert:
I31ed9488297e516920a2183e4311357ffdd098a7 (34ab93a6b8)

Bug: T271365
Change-Id: I987bde4c1ada95e938089122a257292aa16737ae
2021-01-10 17:33:18 +09:00
Amir Sarabadani
c33876f834 Migrate text table to abstract schema
For MySQL/Sqlite, drop the table options, they are for MySQL < 5.0 which
was released in 2003 and not any use today.

For Postgres, rename pagecontent table to text, approved as part of the
RFC. Swap order of creating auto-generated tables and manual tables.

Bug: T230428
Bug: T164898
Change-Id: Id7510b80beed7a7297353094a57d5e2d4f12fc64
2021-01-09 16:07:54 +01:00
Amir Sarabadani
5cfdb13c0f Add missing PG indexes of ipblocks
To make the work of abstracting this table easier.

Bug: T230428
Bug: T164898
Change-Id: I259c99aec7b6df27269fe02172ae4905ecfd29c2
2021-01-09 15:01:51 +01:00
jenkins-bot
ef27ef25d1 Merge "rdbms: Use PSR-3 for ChronologyProtector shutdown debug message" 2021-01-09 00:41:53 +00:00
jenkins-bot
ea87b898d9 Merge "Set the default horizontal alignment based on the page content language" 2021-01-08 21:51:13 +00:00
jenkins-bot
579e50d02d Merge "Split off inline/frameless from thumb/frame styling" 2021-01-08 21:46:06 +00:00
Arlo Breault
25596a5dea Set the default horizontal alignment based on the page content language
Previously it would flip based on the chrome, which isn't the way the
legacy parser has been doing it.

The choice of whether .mw-content-$dir are the right selectors can be
cleaned up with T258719.  We're already using them elsewhere in the file
so it seems like something that should be done all at once.

Bug: T269704
Change-Id: I1a2cc989c35506172af361cd86a4a378ddf58ecb
2021-01-08 21:19:56 +00:00
jenkins-bot
fc86a363d1 Merge "Unknown features shouldn't break style output" 2021-01-08 20:59:15 +00:00
jenkins-bot
44252a899c Merge "Add helpful @var tags to BlockManagerTest" 2021-01-08 20:45:38 +00:00
Arlo Breault
a2342d1420 Split off inline/frameless from thumb/frame styling
Refactor to clarify that the styles for these two groups
are indeed distinct and that sharing code between them
isn't giving any benefit since it's pretty much all overridden

Also address a problem with .mw-halign-none not rendering properly
due to ordering issues

Change-Id: I311bfa6419e493a5b36aeef4433e9730658e328a
2021-01-08 20:20:54 +00:00
jenkins-bot
4d33b27355 Merge "phpunit: Remove odd "MediaWiki" group from tests using it" 2021-01-08 19:00:57 +00:00
jenkins-bot
69d121ce9e Merge "Fix grammar in comment in tables.sql" 2021-01-08 18:57:15 +00:00
Timo Tijhof
a53a38ec5e phpunit: Remove odd "MediaWiki" group from tests using it
Doesn't appear to have any meaning.

Change-Id: Id12599874f7f5bd727693b9decb190e9d5c7305d
2021-01-08 18:35:30 +00:00
Thalia
fbdee6fa79 Fix grammar in comment in tables.sql
Change-Id: I9c5be81a289e223d7302185377851d548e64cfa9
2021-01-08 18:28:31 +00:00
jenkins-bot
7b7082f9c0 Merge "Introduce GroupPermissionsLookup" 2021-01-08 17:47:26 +00:00
jenkins-bot
d1eaf48f54 Merge "Respect lessMessages option" 2021-01-08 16:28:10 +00:00
Thiemo Kreuz
7166284835 Add helpful @var tags to BlockManagerTest
Without these IDEs mark method calls on the wrapped objects
as errors.

Change-Id: I4d7ee0d7475174c20a18df99ebda7ef1a3afbd56
2021-01-08 17:13:13 +01:00
jenkins-bot
f592c15e8f Merge "Remove unnecessary phan issue suppression" 2021-01-08 15:47:08 +00:00
Ammarpad
930f6fbe20 Remove unnecessary phan issue suppression
Make ApiQueryBase::addOption() annotation consistent with
SelectQueryBuilder::option() since the ApiQueryBase method
is just a wrapper to it.

Change-Id: Ib301bce787c8ba89ae8333eb7cfb8d7d287de20c
2021-01-08 10:37:52 +01:00
jenkins-bot
38e19cdd82 Merge "Localisation updates from https://translatewiki.net." 2021-01-08 07:55:49 +00:00
Translation updater bot
e2452743bb Localisation updates from https://translatewiki.net.
Change-Id: I621a620bb88af830b4d282241b5d9ecaa511e50c
2021-01-08 08:54:25 +01:00
jenkins-bot
7e3c1e6629 Merge "ApiQueryInfo: Return watchlist expiry when applicable for inprop=watched" 2021-01-08 07:52:13 +00:00
jenkins-bot
a34e301357 Merge "ParserTestRunner: share more code w/ MediaWikiIntegrationTestCase" 2021-01-08 05:42:37 +00:00
C. Scott Ananian
665eae14ac ParserTestRunner: share more code w/ MediaWikiIntegrationTestCase
Refactor the database setup code to share more code between
ParserTestRunner and MediaWikiIntegrationTestCase.  Made
`::setupAllTestDBs` static so it can be reused from
ParserTestRunner.

Made ParserTestRunner::addArticle more like
MediaWikiIntegrationTestCase::addCoreDBData().  Some additional
refactoring work could be done here in the future to share more code.

After the refactoring the ParserTestTables hook is no longer necessary
and so has been (soft) deprecated.  MediaWikiIntegrationTestCase
clones all database tables, so ParserTestRunner no longer needs to ask
extensions for a list of specific tables it should clone.  Cleaning up
the handful of extensions which define this hook will be left to a
future patch set.

Change-Id: I5124789fac333a664b73b4b4a1e801ecc0a618ca
2021-01-07 23:31:12 -05:00
jenkins-bot
320af70270 Merge "Make use of CURLMOPT_MAX_HOST_CONNECTIONS conditional on having curl >= 7.30.0" 2021-01-08 01:32:45 +00:00
jenkins-bot
bce3018f2c Merge "Temporary debug log if Title::getLocalURL is used from render action" 2021-01-08 01:21:13 +00:00
jenkins-bot
4f735ac0a3 Merge "FileBackend: Do not use SOCKET_ENOENT on windows" 2021-01-08 01:21:07 +00:00
jenkins-bot
e00dc65892 Merge "exception: Move remaiming MWExceptionHandler tests to its test case" 2021-01-08 01:21:00 +00:00
jenkins-bot
1dd9a4ca63 Merge "resourceloader: Fail gracefully if a LESS message is not found" 2021-01-08 01:09:47 +00:00
jdlrobson
0102f3affa Respect lessMessages option
Uncovered while working on a side project. If the option has been
set, it should be merged with the ResourceLoaderSkinModule property.
It should not replace it.

Change-Id: I413c862afe7e5266ab9f2635211fac635bcd786d
2021-01-08 01:07:55 +00:00
jenkins-bot
5a6e6c35a6 Merge "mediawiki.visibleTimeout: Clean up code and complete code coverage" 2021-01-08 00:04:16 +00:00
Timo Tijhof
8ad97d7c32 resourceloader: Fail gracefully if a LESS message is not found
The message cache is originally meant for mw.messages in JS,
which expects non-existent messages to be cleanly omitted.
There is minimal server-side and client-side handling in place for this.

For LESS, however, we were assuming that the blob is complete,
thus not feeding anything to the LESS compiler, thus leading to
a run-time failure where the LESS file can't be parsed at all
due to an undeclared variable.

This could happen sometimes during development or after upgrading
a wiki with a stale LocalisationCache that is still being updated
at that time.

Bug: T267785
Change-Id: I60ff4eb7dce1fee56470acc177afd29ee14b764f
2021-01-07 15:41:02 -08:00
Timo Tijhof
613df39569 rdbms: Use PSR-3 for ChronologyProtector shutdown debug message
This is sent at the end of the LBFactory::shutdown wrapper, so will
still happen at the same logical point in time.

Use LBFactory->replLogger since that it is also the logger used
by ChronologyProtector.

Bug: T254634
Change-Id: Ic4a9573e6cd3ea00f77b2f44c03453c5b96fa486
2021-01-07 23:35:37 +00:00
jenkins-bot
5197b4fe2a Merge "resourceloader: Document reason for jsminplus error suppression" 2021-01-07 23:22:10 +00:00
Timo Tijhof
8819f3293c exception: Move remaiming MWExceptionHandler tests to its test case
These were left behind during the initial sprint (344481f60d) for
UnitTestCase as it used a global variable. Since then, UnitTestCase
has gained support for resetting these automatically for simple
cases like this. No need to bring in IntegrationTestCase for it.

Change-Id: Id8717c1f4148510ae4a67aec7a2dc0d23679a5ac
2021-01-07 15:09:12 -08:00
Timo Tijhof
7a66fa7d2f mediawiki.visibleTimeout: Clean up code and complete code coverage
* Add tests for was untested fallback logic.

* Rename 'hidden' to 'HIDDEN' to make it clearer that this is not a
  (dynamic) boolean but a string constant.

* Remove case for msHidden. The best I can tell, this was never a thing
  in any version of IE. Similar code in EventLogging, for example, does
  not contain this case either. CanIUse and MDN confirm that this is
  supported through the standard since IE10+, including IE11.
  <https://caniuse.com/mdn-api_document_hidden>

* Document that the 'else' branch for `document[ HIDDEN ]` is
  handling both the 'visible' case and the "unsupported API" case.

* Define local functions normally as such. Avoid confusing var assignments
  for functions that are not dynamic or conditional.

* Clean up 'init':
  - Use under the same name in source and in test.
  - Avoid shadowing variable 'document'.
  - Move default logic to `init()` so that it must be called before
    use, instead of previously where it could work without it.
    This also makes it easier to restore, and allows the real global
    to be explicitly references as such for improved static analysis.
  - Add missing restoration to test suite.

* Remove redundant closure from test suite file.

Change-Id: I6180682f49781e51551048c2d16ca40c044dda98
2021-01-07 14:54:54 -08:00
jenkins-bot
92f5a8520b Merge "http: Remove exception from MultiHttpClient for missing cURL" 2021-01-07 20:55:54 +00:00
jenkins-bot
5e34eaba44 Merge "Add type hints to several hook interfaces" 2021-01-07 20:21:07 +00:00
DannyS712
52359768c5 Convert or split some tests to MediaWikiUnitTestCase
Don't require any integration

Change-Id: I293a84ce8fe87fc6932f8a6400d6ca443ccc6235
2021-01-07 17:51:27 +00:00
jenkins-bot
e8042e7083 Merge "EnhancedChangesList::getDiffHistLinks: Fix version of deprecation" 2021-01-07 17:33:29 +00:00
jenkins-bot
a3a3e9f3af Merge "CoreTagHooks: First argument passed to parser tags can be null" 2021-01-07 17:29:28 +00:00
jdlrobson
381499a675 Unknown features shouldn't break style output
If a new feature is added, it should be safe for skins to use it
without breaking their backwards compatibility.

For example if the normalize feature in 1.36 is being used a skin
should be able to use it, and then using version_compare add additional
styles for older versions of mediawiki

Bug: T271441
Change-Id: I074415970455ef701b48d11ff97c01af24197eeb
2021-01-07 09:18:18 -08:00
Matěj Suchánek
75739cbd52 EnhancedChangesList::getDiffHistLinks: Fix version of deprecation
Follow-up to 23b4bdb153; the patch was merged into 1.36, not 1.35.

Change-Id: I20979df6d707e38b126d1dd36ce7209d1386acd7
2021-01-07 17:07:56 +00:00
Translation updater bot
66db49e243 Localisation updates from https://translatewiki.net.
Change-Id: I121b68c84dec58e8c98a9278e7328510e7cddb41
2021-01-07 08:30:23 +01:00
jenkins-bot
d17dd32d92 Merge "Revert "Provide native support to dismiss sitenotice in core."" 2021-01-07 00:09:20 +00:00