Commit graph

109021 commits

Author SHA1 Message Date
daniel
1137a357db phpunit: Revert "testConfigGeneration" structure test to simpler version
This was changed to support in-place updates of files,
but the idea which was since abandoned. So we can go back to
using stdout.

Change-Id: I825a00258c4f50244679fc47c81b6920dd241647
2022-03-24 14:57:47 +00:00
jenkins-bot
24dda0fb49 Merge "Handle broken media and thumb error in the same case for gallery" 2022-03-22 17:04:28 +00:00
jenkins-bot
5a4f20969e Merge "UndeletePage: Return error instead of warning when the operation is aborted" 2022-03-22 16:47:55 +00:00
Translation updater bot
87d9978e89 Localisation updates from https://translatewiki.net.
Change-Id: I73afd56819528216d0558f95dce37b963c990950
2022-03-22 08:15:21 +01:00
jenkins-bot
54c3343540 Merge "Render broken media in galleries as in Parsoid" 2022-03-22 04:09:19 +00:00
jenkins-bot
e4a3b42ef2 Merge "Fix default value for $wgShowEXIF and $wgUSePathInfo." 2022-03-22 00:49:29 +00:00
Arlo Breault
51c7ee2de4 Handle broken media and thumb error in the same case for gallery
These generate the same output in Parsoid.

Note the badfile case is T75581

Change-Id: Idac6d87072551f77713dbaf05ed4156c1a01d0c5
2022-03-21 20:36:52 -04:00
Arlo Breault
0f1bab753d Render broken media in galleries as in Parsoid
This makes it consistent with broken media outside of galleries and
matches the output of Parsoid.

Only applied when `$enableLegacyMediaDOM` is not set.

Bug: T304112
Change-Id: I45eebc8073c2bfe2177eceb1a1b34378268235da
2022-03-21 19:42:41 -04:00
jenkins-bot
af2dcca41f Merge "Bump wikimedia/parsoid to 0.16.0 for MW 1.39" 2022-03-21 23:37:21 +00:00
C. Scott Ananian
241cf6d972 Bump wikimedia/parsoid to 0.16.0 for MW 1.39
Depends-On: I84fe739494237a2e6de24a4864d652f3e27265f7
Change-Id: Ic403cac3bad87a64686257d06f3fb6cc558de310
2022-03-21 17:42:47 -04:00
Timo Tijhof
f5018461d3 qunit: Remove OutputPage::getJSVars() call from test runner
Bug: T89434
Change-Id: Iea78f8721baa9e401af7f1b11d7c725b2269a8cd
2022-03-21 20:52:18 +00:00
jenkins-bot
2f7da6037a Merge "Fix uses of (error|warning|success)box in core" 2022-03-21 20:16:57 +00:00
daniel
32e27c7c1c Fix default value for $wgShowEXIF and $wgUSePathInfo.
This was inadvertedly broken in
I7a883fe3c952cc653d43b7e399631ec3beab0bc3.

Change-Id: Ib4b8962fdcea29dd7f37d6a0333088038d4147bf
2022-03-21 21:13:50 +01:00
Umherirrender
1f71eccf63 phan: Disable null_casts_as_any_type setting
Make phan stricter about null types by setting null_casts_as_any_type to
false (the default in mediawiki-phan-config)
Remaining false positive issues are suppressed.
The suppression and the setting change can only be done together

Bug: T242536
Bug: T301991
Change-Id: I0f295382b96fb3be8037a01c10487d9d591e7e01
2022-03-21 18:25:07 +00:00
jenkins-bot
50938694e5 Merge "ApiParse: Ignore 'contentformat' param when the query is based on page" 2022-03-21 17:36:04 +00:00
jenkins-bot
6d3d1bbee2 Merge "listFiles: Follow-up 1b432d4c, fix a typo" 2022-03-21 15:54:48 +00:00
jenkins-bot
8ca144b9f5 Merge "user: Let UserArray::newFromResult return empty iterator" 2022-03-21 11:25:05 +00:00
jenkins-bot
2399e91825 Merge "qunit: Remove most mw.config OutputPage vars from SpecialJavaScriptTest" 2022-03-21 11:00:53 +00:00
Translation updater bot
84cdb04467 Localisation updates from https://translatewiki.net.
Change-Id: I77756f651c0d467971bffb3cf1061454fc060403
2022-03-21 08:00:11 +01:00
Timo Tijhof
a970307ab7 qunit: Remove most mw.config OutputPage vars from SpecialJavaScriptTest
As part of making sure tests are not accidentally depending on global
state or some aspect of the skin, Special page, logged-out user, etc,
continue the removal of skin-specific code from SpecialJavaScriptTest.

This follows T131389 which previously removed the HTML layout,
stylesheets, and additional scripts from the test runner page already.

Bug: T89434
Depends-On: I9485b006804e243f9e022ca0668b290cf9d53f32
Depends-On: Ib20c1f5277c5d5a99f5117c82b7cbdeab75d3279
Change-Id: Iaf989bc50363a2525a922f745c0a1a6a992404f9
2022-03-21 03:34:34 +00:00
jenkins-bot
1e21707410 Merge "resourceloader: Set class-wide @covers and ignore coverage of HookRunner" 2022-03-20 23:48:31 +00:00
stang
9c70df0cf6 Fix uses of (error|warning|success)box in core
Replace HTML class for boxes with "mw-message-box-" style.

Bug: T300358
Change-Id: Iddb0fd3ae859714fb03d3a6d4586f8525becaac6
2022-03-20 21:15:26 +00:00
Umherirrender
e92b5edcaa user: Let UserArray::newFromResult return empty iterator
Instead of undocumented null which can break callers

Found by phan strict checks

Change-Id: I16f4de42df6861f8b9d063a7cb1f2b475293c30d
2022-03-20 18:57:53 +00:00
jenkins-bot
e6d7146e7a Merge "rdbms: mark trxStatus() as @internal and cleanup the comments" 2022-03-20 16:16:31 +00:00
jenkins-bot
9a8d8760a3 Merge "rdbms: make DatabaseSqlite release named locks on connection loss" 2022-03-20 15:59:23 +00:00
jenkins-bot
2876074562 Merge "phan: Disable scalar_implicit_cast setting" 2022-03-20 15:55:45 +00:00
jenkins-bot
aeffa36137 Merge "page: Store Wikipage::mIsNew/mIsRedirect as real bool, not integer" 2022-03-20 15:55:37 +00:00
Aaron Schulz
aca6f1979c rdbms: mark trxStatus() as @internal and cleanup the comments
Change-Id: I4cd682cf5df59b092e5985220d31cee3bb94d38a
2022-03-20 15:42:06 +00:00
Aaron Schulz
38344d9a07 rdbms: make DatabaseSqlite release named locks on connection loss
Make closeConnection() and doHandleSessionLossPreconnect() more
consistent with the base class by releasing named locks.

Change-Id: I7f7263c0d6b9473566ccb37113a30e6f360e8e29
2022-03-20 15:32:54 +00:00
Timo Tijhof
6522ff4ae2 resourceloader: Set class-wide @covers and ignore coverage of HookRunner
Change-Id: I49379986f0e7c05fb3442f0de9f496f151c4bed5
2022-03-20 15:17:21 +00:00
Func
845bf42aa9 ApiParse: Ignore 'contentformat' param when the query is based on page
The 'contentformat' param should only have effects when the parsing
is based on the 'text' param, as what the document described.

Bug: T206253
Change-Id: Ia12b8697e515c6ba89ea81f085292d1ef018bf58
2022-03-20 20:33:20 +08:00
Func
ad03485be1 listFiles: Follow-up 1b432d4c, fix a typo
Sorry for my mistake and inconvenience caused.

Bug: T293576
Change-Id: I27c8b603bb2365f9078944046a3dd8049415d379
2022-03-20 17:30:34 +08:00
Aaron Schulz
4718e2c529 objectcache: add makeTimestampedModificationToken() type hint
All callers pass in floats and this is the expected type, used
to fill $microseconds.

Bug: T303628
Change-Id: I6c6176b4cc308646d86a5b9d2afdc91aadda4a0d
2022-03-19 21:26:35 +00:00
Aaron Schulz
3f6e4c1746 Fix phpunit failures due to invalid testGetResultAllTables provider
Use the correct casing for MySQLPlatform

Change-Id: I731ee4e828da06a1fb668d099b0e9a31b72aeabf
2022-03-19 20:58:45 +00:00
Func
5339aa645b ApiParse: Fail gracefully when the requested format is not supported
Format like 'application/json' is not supported for content model
wikitext, don't fail as internal exception.

This fix the case when providing text/title parameter.

Bug: T206253
Change-Id: I20ef52aa961143b7c50283c0d06acea9f220619c
2022-03-19 19:29:28 +00:00
Umherirrender
6dd8a2bb32 phan: Disable scalar_implicit_cast setting
Make phan stricter about scalar types by setting scalar_implicit_cast to
false (the default in mediawiki-phan-config)

Bug: T242536
Bug: T301991
Change-Id: Ia2fe30b17804186571722e728578121c8b75d455
2022-03-18 18:52:24 +00:00
Alexander Vorwerk
82739980fd parser: change 'level' in parse api back to string
We changed to operate on an int internally in I92daeb0f7be8a0.
Let's cast it back to a string for the api in order to prevent
a breaking change, which is not really necessary.

Bug: T304171
Change-Id: I5f5a9203b4dd085cb5defba72c6650532bc9e8d1
2022-03-18 19:52:24 +01:00
Umherirrender
ed2805e309 page: Store Wikipage::mIsNew/mIsRedirect as real bool, not integer
Storing ints and bools in the fields is confusing.
Cast to bool when setting. Use ints for the database.

Found by phan strict checks

Change-Id: I98b4f0e80182d29a1836f722d8739ecdb33bab05
2022-03-18 18:51:41 +00:00
jenkins-bot
fdcbeb6a6c Merge "Simplify TransactionManager::pendingWriteQueryDuration" 2022-03-18 18:31:11 +00:00
jenkins-bot
d2391847a9 Merge "objectcache: Clean up getMultiWithUnionSetCallback() test cases" 2022-03-18 16:58:43 +00:00
jenkins-bot
1254d4d91c Merge "Cast block id to string in BlockManager::getCookieValue" 2022-03-18 15:50:41 +00:00
jenkins-bot
65ad80c12e Merge "objectcache: clarify usage of getMultiWithUnionSetCallback()" 2022-03-18 15:43:15 +00:00
Timo Tijhof
c2c663e6e1 objectcache: Clean up getMultiWithUnionSetCallback() test cases
It took me a good half hour to understand what these tests are doing,
and another half hour to build up a modicum of confidence that the
current behaviour is the indeed the desired behaviour.

* Remove random strings.

* Remove indirection and computed expected values as much as possible
  in favour of inlined literals that explicitly expect outcomes.

* Remove confusing second argument from the data provider
  getMultiWithUnionSetCallback_provider, which wasn't used, and
  add labels to it.

* Remove some of the existing inline comments.

* Add some inline comments with what I've understood.

* Fix bug in "C: Repeat case with recently created check keys",
  which claimed to be observing that caches were ignored due to the
  check key being too new, when in fact it was a cache miss simply
  because the key didn't exist yet upto this point. Make it actually
  repeating by adding a second call afterwards to observe the
  stated behaviour.

Bug: T303092
Change-Id: I874a20ecd49464f7b0e6a0b579c000dc0e804c0a
2022-03-18 15:41:08 +00:00
Umherirrender
569476a0f4 Simplify TransactionManager::pendingWriteQueryDuration
No need for the switch
phan does not see correct type for $rtt due to conditions

Also adjust $rtt to be a float as set by IDatabase::ping

Found by phan strict checks

Change-Id: Ia76e1062e06b00ae13d5c1a516d78b4e5cf6f1f5
2022-03-18 15:19:24 +00:00
Umherirrender
3110cfceac Cast block id to string in BlockManager::getCookieValue
The functions returns the block id, which is typed as string.
Also MWCryptHash::hmac needs a string

Found by phan strict checks

Change-Id: I457dd094d033671c22e221a94746579a25fe8b7a
2022-03-18 16:05:06 +01:00
jenkins-bot
8f86ffab04 Merge "media: Limit result array of explode() to minimum needed" 2022-03-18 13:55:33 +00:00
jenkins-bot
4d236a74ee Merge "LoadBalancerTest: Avoid using hard-coded table prefix" 2022-03-18 13:39:05 +00:00
jenkins-bot
5e6021e01b Merge "parser: Cast return of Timestamp::format to int for n" 2022-03-18 13:02:44 +00:00
jenkins-bot
a2bdaea11e Merge "parser: Fix various scalar types to match documentation" 2022-03-18 13:02:21 +00:00
jenkins-bot
e7341b3511 Merge "maintenance: Improve updateSpecialPages.php and related documentation" 2022-03-18 13:01:30 +00:00