Commit graph

108622 commits

Author SHA1 Message Date
Reedy
e65b353296 composer.json: Add 7 more PHP extensions to suggest
Bug: T302540
Change-Id: I795e785dd70f10479ef1f522f1528de08e4cdb72
2022-03-05 22:38:25 +00:00
jenkins-bot
fd7a9bb2c7 Merge "Pass rcid as integer to DifferenceEngine::createDifferenceEngine" 2022-03-05 21:18:11 +00:00
Umherirrender
ca24df16af redis: Check last error for null before using preg_match
preg_match should not be called with null value

Found by phan strict checks

Change-Id: I7c2147931ab0e92213f66ca7fb3a24b1468dbe21
2022-03-05 19:52:18 +01:00
Umherirrender
0cf2ec2585 Pass rcid as integer to DifferenceEngine::createDifferenceEngine
Found by phan strict checks

Change-Id: I3c0454c1df66f6a04c3392acaf8368040d03eb77
2022-03-05 19:45:57 +01:00
jenkins-bot
d6818823a2 Merge "Change configuration for Kirundi (rn)" 2022-03-05 18:23:34 +00:00
jenkins-bot
02ac01ec86 Merge "composer.json: Add DB drivers to suggests" 2022-03-05 15:59:39 +00:00
jenkins-bot
ace474e80b Merge "block: Use $wgUpdateRowsPerQuery for purgeExpiredBlocks()" 2022-03-05 11:35:09 +00:00
jenkins-bot
b0fe861a70 Merge "rdbms: Move transaction callbacks out of Database to TransactionManager" 2022-03-04 23:49:56 +00:00
jenkins-bot
72495fdf49 Merge "Remove deprecated alias $wgStyleSheetPath" 2022-03-04 22:49:13 +00:00
Amir Sarabadani
573e27bd63 rdbms: Move transaction callbacks out of Database to TransactionManager
One of the last pieces of moving out transaction logic out of Database

Bug: T299698
Change-Id: I7858ecb3ea5c1e833379eb8be0a4c75666ccdff8
2022-03-04 22:41:30 +00:00
Timo Tijhof
fb7e47fd5a block: Use $wgUpdateRowsPerQuery for purgeExpiredBlocks()
Follows-up I052735edbfac.

Bug: T301742
Change-Id: Iec989945f4c592d7569e62199dd8190c535acae7
2022-03-04 22:40:53 +00:00
jenkins-bot
ae1238fae5 Merge "rebuildLocalisationCache: Update threaded support to check ext-sockets" 2022-03-04 22:04:29 +00:00
Timo Tijhof
14f597c0b2 rebuildLocalisationCache: Update threaded support to check ext-sockets
Follows-up I1ace2e5de7f1959ac057d3.

Change-Id: Ie1d1124fe427452569c27dfc6e93e859aadbcdb1
2022-03-04 21:33:28 +00:00
daniel
f31bc32a65 Remove deprecated alias $wgStyleSheetPath
$wgStyleSheetPath has been a deprecated alias for $wgStylePath since 1.3 (2004).
Time to get rid of it.

Change-Id: I78a6394003b9aefab7aa8559b8e2b22bc50154fc
2022-03-04 13:36:56 +01:00
jenkins-bot
49cdb4546b Merge "Handle null in ChangeTags::modifyDisplayQuery" 2022-03-04 12:33:22 +00:00
jenkins-bot
47cb6a9be1 Merge "Optionally use config-schema in Setup.php" 2022-03-04 12:09:09 +00:00
Matěj Suchánek
aa22212ad8 Handle null in ChangeTags::modifyDisplayQuery
Some callers (notably HistoryPager) would also provide null
prior to 79577c79. This caused page history to disappear.
Cover all these special inputs with a regression test.

Bug: T303033
Change-Id: I29e885107fc4a5b090226d8161ce823157268bf0
2022-03-04 11:12:14 +01:00
Thiemo Kreuz
e2b70320a3 Skin: Streamline confusing "checkTitle" related code
This is a direct follow up for what was done in I87c76fd.

Notable:

* I removed multiple "this is an invalid title" titles. These are
effectively debug messages, but why should the user see them? Either
throw an exception, or render a link that is clearly broken – as I
suggest here.

* "checkTitle" is a helper method with a strong side effect that is
not obvious from the name, in my opinion. I could not find relevant
usages and removed it.
https://codesearch.wmcloud.org/search/?q=:checkTitle%5C(&files=%5C.php%24

I propose to remove the method without deprecation because it is very
obviously meant to be a private helper method. The way it's designed
(especially in this rather specific class) it doesn't make sense to
call it from anywhere else.

Depends-On: Ic7f168fa89f0788ca679eac067b40e735f3dcc46
Change-Id: Ic776a6cdc6be30feb92b7224ef13994c14db726c
2022-03-04 09:26:39 +00:00
Translation updater bot
df7acbd466 Localisation updates from https://translatewiki.net.
Change-Id: I4044703d7f95953559e2a5618aaf0bbdb1dde72b
2022-03-04 08:07:16 +01:00
Jon Robson
706047eb27 Update nstab-mainpage using on-wiki message values
Various wikis have slightly different values for this message.
In some of those wikis there is no core definition.

It therefore seems useful to import these so a larger number of
projects benefit.

Generated via:
https://gist.github.com/jdlrobson/48168a905d814368cb75212f1b0d7bca

Bug: T301203
Change-Id: I9497777c642e53f7b3fd6cfab2ce6a1ef5bbc9d6
2022-03-04 00:08:30 +00:00
jenkins-bot
ed3641f1bc Merge "rdbms: Deprecate getLazyConnectionRef" 2022-03-03 22:48:21 +00:00
jenkins-bot
e99a1b5ff6 Merge "rcfeed: Allow easy mocking of RCFeed::factory objects" 2022-03-03 22:42:00 +00:00
jenkins-bot
e382603a60 Merge "changetags: Fix management of a '0' tag" 2022-03-03 22:40:54 +00:00
Matěj Suchánek
79577c79ff changetags: Fix management of a '0' tag
The tag wouldn't be treated as active, wouldn't be displayed
in changes lists and it wouldn't be possible to filter it,
although it was possible to create it.

The changes in ::modifyDisplayQuery are needed, because
ContribsPager may provide false.

Add a regression test for ::formatSummaryRow.

Bug: T296642
Change-Id: Iddb1e978387a0009425f6fad1821d9d15c0f5f23
2022-03-03 22:24:01 +00:00
jenkins-bot
f092830a51 Merge "revisionlist: Allow subclasses of RevisionItemBase::getId to use string" 2022-03-03 22:00:30 +00:00
jenkins-bot
42ee15e670 Merge "mime: Return bool from error handler" 2022-03-03 22:00:23 +00:00
jenkins-bot
0fca97bbf8 Merge "deferred: Improve port handling in CdnCacheUpdate::naivePurge" 2022-03-03 21:56:42 +00:00
jenkins-bot
b951770d9e Merge "Fix various documentation related to false" 2022-03-03 21:56:34 +00:00
jenkins-bot
906fdeeeda Merge "Fix documentation about query parameter as string[]" 2022-03-03 21:56:01 +00:00
jenkins-bot
b87555847f Merge "parser: Adjust documentation about false for $wgExternalLinkTarget" 2022-03-03 21:53:38 +00:00
Umherirrender
45a4868f55 parser: Adjust documentation about false for $wgExternalLinkTarget
The default for $wgExternalLinkTarget is false,
which can be set or returned on ParserOptions

Found by phan strict checks

Change-Id: Ibcf6c40eaf1ffb628fc1b92a0d0ecd79d9421100
2022-03-03 22:35:41 +01:00
Umherirrender
65e49aee41 skins: Avoid Title -> string -> Title conversion on ::makeUrlDetails
The title object of the user page is needed to get the local url.
Just reuse the existing title instead of converting it to a string and
back.

Change-Id: I87c76fd82be340e3f8cdbb3b52a531b3b579f6a0
2022-03-03 21:24:01 +00:00
jenkins-bot
df03eea916 Merge "export: Cast File::getSize to string on dump" 2022-03-03 21:11:02 +00:00
Umherirrender
0d8c74d62b Fix documentation about query parameter as string[]
Url query parameter sometimes contains integer,
which are not allowed on string[], just use array instead.

Found by phan strict checks

Change-Id: I7eabe69ee7a78ffee05413a022caec940672ae9f
2022-03-03 22:04:56 +01:00
Umherirrender
9ed1ed185f Fix various documentation related to false
Some function already document "False on failure", but does not document
it on the used type

Found by phan strict checks

Change-Id: I12eb8bbc99179833ee3e42c1a7d1dc1443682ca6
2022-03-03 21:33:31 +01:00
Umherirrender
7b091a2a49 deferred: Improve port handling in CdnCacheUpdate::naivePurge
Avoid null on php internal and cast to int

Found by phan strict checks

Change-Id: Ifb874b366d88cde51960004e5489a9c57ca9c4c6
2022-03-03 21:23:38 +01:00
jenkins-bot
73a422bcf9 Merge "rdbms: Migrate TransactionProfiler calls to TransactionManager" 2022-03-03 20:20:56 +00:00
Timo Tijhof
780930fa6b rcfeed: Allow easy mocking of RCFeed::factory objects
This matches what the RecentChange::getEngine method provides,
which is deprecated and replaced by this. However, in order to
update tests (such as those in EventBus) to the new method, that
method first has to support mocking of this kind.

Bug: T250628
Change-Id: I126f7c8b117b5d2e66a41ebb314523083e764547
2022-03-03 18:26:26 +00:00
daniel
3adc408556 Optionally use config-schema in Setup.php
In order to safely transition Setup.php to load config-schema.yaml
rather than DefaultSettings.php, we need to be able to test the new
setup mechanism selectively, on only a few hosts.

This patch makes Setup.php use config-schema.yaml if the
MW_USE_CONFIG_SCHEMA variable is set.

The condition could be patched in production to be based on the host
name or a request parameter for further experimentation in the live
environment.

Bug: T300129
Change-Id: Idc12b8e6ee2a3cc41cf5ab8d1eb755e6fab0213d
2022-03-03 18:05:21 +00:00
jenkins-bot
ffa162e114 Merge "mediawiki.page.ready: Skip 'wikipage.content' when content is absent" 2022-03-03 17:11:22 +00:00
Thiemo Kreuz
88eefdae1a Trivial replacements of "-" comparisons with isDisabled()
This is split from I1d267ae, as well as a follow-up to Ie70d849.

Custom code like this exists because some messages do something
like {{#if: … | … | - }} to get dynamically disabled. This is not
something isDisabled() supports. That acts on the unparsed message
before any {{…}} was expaned.

The few cases in this patch are not affected because they use plain(),
which does not do any {{…}} expansion anyway.

Change-Id: I70541cf28c6fff14422e202f774b86086c2a850c
2022-03-03 16:13:45 +00:00
jenkins-bot
beef2dc2db Merge "ApiUpload: Pass empty tags as empty array instead of null" 2022-03-03 14:51:45 +00:00
jenkins-bot
3cf3724f9e Merge "Fix broken SQLite test and simplify." 2022-03-03 14:34:43 +00:00
jenkins-bot
794411f63b Merge "installer: Use WebRequest::getIntOrNull to get integer" 2022-03-03 14:33:28 +00:00
jenkins-bot
86e348cd1f Merge "tests: Make the error message of SettingsTest more informative" 2022-03-03 14:29:36 +00:00
Umherirrender
04d4b5addb export: Cast File::getSize to string on dump
Xml::element needs a string to produce the tag,
explicit cast the integer and convert the possible false to zero.

Found by phan strict checks

Change-Id: I349d9ab2f999a569a90402d5197fba56e5451fc2
2022-03-03 14:09:27 +00:00
Amir E. Aharoni
2b5cb28869 Change configuration for Kirundi (rn)
* Change the autonym to "ikirundi". It appears in Ethnologue,
  in the Kirundi Wikpiedia, and in the
  Kirundi-English Dictionary by Elizabeth E. Cox.
* Add MessagesRn.php with namespaces.

The information was confirmed by User:Gilbert Ndihokubwayo.

Bug: T302972
Change-Id: I4e97ad206fca19a46219539166fdb909381dbce4
2022-03-03 14:33:51 +02:00
Amir Sarabadani
c3e5bd1326 rdbms: Deprecate getLazyConnectionRef
Bug: T255493
Change-Id: Ie352142c7aa120f2f8985ddcf755a1f4583a5410
2022-03-03 13:15:44 +01:00
Amir Sarabadani
8bbf64d563 tests: Make the error message of SettingsTest more informative
This would have saved me around an hour if I knew it earlier. Let's make
it not happen for others.

Change-Id: I2e146424fc01677383a15d98071d8cbc2d832d9b
2022-03-03 13:07:24 +01:00
Ammarpad
b24332fbcc ApiUpload: Pass empty tags as empty array instead of null
If no tags are specified, null shouldn't be passed as it may
cause problems down the stack

Bug: T302918
Change-Id: I46033d5ddda055c275dbda71d5c38c4a7a858c9d
2022-03-03 12:29:01 +01:00