Commit graph

106641 commits

Author SHA1 Message Date
jenkins-bot
395e60b088 Merge "Simpler RedisLockManager configuration" 2021-11-03 22:38:18 +00:00
jenkins-bot
0103961512 Merge "NoLocalSettings: Pass an EmptyBagOStuff to TemplateParser" 2021-11-03 19:01:55 +00:00
jenkins-bot
b2af67d496 Merge "Allow populateContentTables to continue when there are bad blobs" 2021-11-03 17:29:30 +00:00
Reedy
ee0e5ebc01 NoLocalSettings: Pass an EmptyBagOStuff to TemplateParser
Bug: T278037
Change-Id: I874ccb2667b782b2cbbf8b829fdaf34cf334da06
2021-11-03 17:23:26 +00:00
Derick Alangi
efd780c31e Convert response to string & fix assertEquals() to assertSame()
Actually, `->getBody()` returns a stream interface and in order to
get the body's content, just call `->getContent()` which will return
the response's body content in string format.

Change-Id: I9527c8a29c8da2342c8ac958c4e7bb6ba12fd613
2021-11-03 13:15:19 +01:00
jenkins-bot
a48b932e8e Merge "Title: use PageStore instead of LinkCache" 2021-11-03 11:29:46 +00:00
jenkins-bot
f60aefd1af Merge "Add comment flag to LinkRenderer" 2021-11-03 10:32:11 +00:00
Translation updater bot
59bdc32835 Localisation updates from https://translatewiki.net.
Change-Id: I5c2c1802253566c920cc6c7039ab5c6498162399
2021-11-03 08:06:53 +01:00
jenkins-bot
ffae12c74a Merge "Remove duplicate settings from DefaultSettings" 2021-11-03 05:16:52 +00:00
jenkins-bot
0cc1c1a3dd Merge "resourceloader: Change Context::getHash to always pass strings to implode" 2021-11-03 00:55:59 +00:00
Umherirrender
808191ebc4 resourceloader: Change Context::getHash to always pass strings to implode
implode is documented as taking a string[], not mixed with int or null.
Explicitly cast or remove those instead of the implicit handling by PHP.

Change-Id: I0fac52c861bf85e09571b61a899b7a041aa77914
2021-11-03 00:32:42 +00:00
Umherirrender
07820b24ae Remove duplicate settings from DefaultSettings
Change-Id: Icb02cc5ddf2a065d77d4ac666047b9f08e799c33
2021-11-03 00:11:11 +00:00
jenkins-bot
5761d95b1f Merge "Fix oldimage deletion error message" 2021-11-02 22:44:45 +00:00
jenkins-bot
a8609a0a6c Merge "EditPage: Only update title part of firstHeading on live preview" 2021-11-02 22:25:57 +00:00
daniel
fd3a695230 Title: use PageStore instead of LinkCache
This causes Title to no longer look up fields in the database
individually, but use LinkCache instead to load an entire row from the
page table at once.

This patch also causes Title to use in-process caching for some
getters that did not use caching before, such as isNewPage()
and getTouched(). These methods do not appear to be used on critical
code paths that involve database updates.

Note that getTouched() used to take an options $db parametr. This
appears to be unused, and has been deprecated in favor of a $flags
parameter, for consistency with other getters on the class.

DEPLOY: Risky! This re-implements the internal caching logic of Title
and slightly modifies caching semantics in some cases. This may have
unforeseen consequences.

Bug: T285389
Depends-On: I103b9e1d2bf594bfc1b0ea12b980dd20bb911c3a
Change-Id: I2df81df7186025e001520f24fd498623c7184772
2021-11-02 23:12:47 +01:00
Tim Starling
61726a9959 Fix oldimage deletion error message
filedeleteerror-short was repeated as an h2, but the parameters aren't
appropriate for prepareMessage() and filedeleteerror-short-old doesn't
exist. The message is used correctly in the following line.

Change-Id: I07481bd7d43e0596af3de183aa7814572805c8c2
2021-11-02 21:35:55 +00:00
jenkins-bot
4ff7ef89c2 Merge "Replace some more isset() with shorter ?? syntax" 2021-11-02 18:44:42 +00:00
jenkins-bot
7e1cd81e52 Merge "Replace new stdClass with more compact array syntax" 2021-11-02 18:38:01 +00:00
jenkins-bot
b6a4acb1ea Merge "Add missing null to string casts when using rd_fragment and such" 2021-11-02 18:33:20 +00:00
jenkins-bot
34951c0538 Merge "Make use of OOUI methods .getItemCount() and .isEmpty()" 2021-11-02 16:54:21 +00:00
jenkins-bot
dfde3e099b Merge "Remove on-demand update of img_sha1" 2021-11-02 16:10:29 +00:00
jenkins-bot
3d965e3a8b Merge "LinkCache: Try invalidating cache before throwing" 2021-11-02 14:51:14 +00:00
Martin Urbanec
b406c52adb LinkCache: Try invalidating cache before throwing
The code that was previously in LinkCache::getGoodLinkRow
may return a cached row object (either from the in-process
cache, or memcached). In some cases, this caused
LinkCache::addGoodLinkObjFromRow to throw, because a field
was missing (although the field is missing only from
the cached copy, not from the database).

To avoid this, try to invalidate the cache
in LinkCache::getGoodLinkRow and retry, before
letting the exception propagate.

Bug: T205349
Change-Id: Ie9e90bf32964047c1831f575cc260d7d62e9e848
2021-11-02 13:10:45 +00:00
Lucas Werkmeister
37d90f3664 Add comment flag to LinkRenderer
This marks whether links are being rendered for comments or elsewhere.
This information can be used in hooks; specifically, Wikibase wants to
add labels to entity links only in comments and on special pages.

Bug: T292203
Change-Id: I9164f760e8b46e05218fb36f430bc36ef1fdf30f
2021-11-02 13:03:20 +01:00
jenkins-bot
7c0ffb3b24 Merge "language: Fix nullable documentation for property, args and return types" 2021-11-02 10:21:05 +00:00
Thiemo Kreuz
ee0f97378b Replace new stdClass with more compact array syntax
It does the exact same. The resulting object is still an stdClass
instance.

Change-Id: Ief68609943ee30aa95732d24021c921dfbad166c
2021-11-02 09:43:03 +00:00
Thiemo Kreuz
62d45967c0 Replace some more isset() with shorter ?? syntax
Change-Id: Ie119167bc2584f047e29174f95c39b65f99a64a6
2021-11-02 10:39:38 +01:00
Thiemo Kreuz
b4429c349f Make use of OOUI methods .getItemCount() and .isEmpty()
Change-Id: I24ae10d4bc4cee62f3a373a4caed65d99faae74f
2021-11-02 10:36:42 +01:00
jenkins-bot
4523ace969 Merge "Special:Contributions - verify early year and month are ints" 2021-11-02 08:51:54 +00:00
Tim Starling
06fc5ddb56 Simpler RedisLockManager configuration
I set up a local test instance with RedisLockManager, but some things
seemed more complicated than they needed to be. So:

* Add lockManager option to $wgLocalFileRepo, which becomes the
  lockManager of the auto-generated file backend.
* Made srvsByBucket be optional. I made the same change to the identical
  code in MemcLockManager and DBLockManager, but I didn't test them.
* Improved doc comments for RedisLockManager::__construct() and
  $wgLocalFileRepo.

Change-Id: I8ce430b8e849589d4ea87c90a56ee3659da085a0
2021-11-02 18:28:23 +11:00
Thiemo Kreuz
41ec072d16 Add missing null to string casts when using rd_fragment and such
These columns are nullable, but the method doesn't accept null.

Found in Logstash.

Change-Id: I3eaafe31005c9319fdd03f8f4b54e7b51ef430f9
2021-11-02 07:14:32 +00:00
Translation updater bot
707cf746f4 Localisation updates from https://translatewiki.net.
Change-Id: I61b008e12e92fc4a350b2e687f9cc95c4253c88c
2021-11-02 07:55:50 +01:00
Tim Starling
cecf964f84 Remove on-demand update of img_sha1
This is just a migration hack that we forgot to remove after
PopulateImageSha1 was added as an update stage. It's complicated to
continue supporting it.

Bug: T283045
Change-Id: I453b3d8ba142a3bd17535c15d3bcf4edce641b39
2021-11-02 16:47:03 +11:00
Petr Pchelko
92a88e4e07 Special:Contributions - verify early year and month are ints
Bug: T293293
Change-Id: I96cf8a24a329dad26e2bf76bf4495c192e296577
2021-11-01 19:16:12 -07:00
Volker E
4c47d37688 Update WVUI to v0.3.2
Release notes: https://gerrit.wikimedia.org/r/plugins/gitiles/wvui/+/refs/tags/v0.3.2/CHANGELOG.md#v0_3_2-2021_11_01

Bug: T290392
Change-Id: I8fb7761e60be330e58cd017872318fe3675c0be1
2021-11-01 17:39:44 -07:00
Umherirrender
7e24705bcd Exclude null values for flag UserOptionsManager::EXCLUDE_DEFAULTS
isset returns false for null and the null values are not compared,
that treats them as non-default, even the default is also null.

Bug: T291748
Follow-Up: I6e61c11d8aed27b4b559e74849e0056e5eef3638
Change-Id: I0a0932b403098967c261eee3dc0e7d5da3c4fffb
2021-11-01 20:44:13 +01:00
jenkins-bot
bba758a65c Merge "Remove unused class fields in LinkRenderer" 2021-11-01 16:22:24 +00:00
jenkins-bot
bde944737d Merge "Use PageUpdater in API test to add revision" 2021-11-01 15:34:31 +00:00
Michael Große
045f1ffb4c Remove unused class fields in LinkRenderer
NamespaceInfo was added in
I4af843238ffd58925f57c0f7b98253a90cb285ec
and removed in:
I5c9ea04a9deca136bb7210f07200d18f97fd6686

Change-Id: I64612b57b0e5e5c7c126d7434e5b108fc735ac57
2021-11-01 15:59:42 +01:00
jenkins-bot
35d9c32cc4 Merge "Hard-deprecate Content::getParserOutput and AbstractContent::fillParserOutput." 2021-11-01 13:57:42 +00:00
Maggie Epps
850dcfa4bb Watchlist: Add space in filters checkbox
Uses \n string to manually create space between checkboxes and labels

Bug: T286262
Change-Id: I9a00a3f26f8c6faa854652c60cb9429e6b92d67d
2021-11-01 12:49:10 +00:00
WMDE-Fisch
e686e06c38 Use PageUpdater in API test to add revision
Change-Id: I9ba1357c0556d572594f4750403b24b5b8cdbdc0
2021-11-01 10:49:52 +01:00
jenkins-bot
5de5c90ac4 Merge "tests: Merge test cases into data provider & remove helper method" 2021-11-01 09:44:30 +00:00
Translation updater bot
1a274810ff Localisation updates from https://translatewiki.net.
Change-Id: I6d7aaa801b5e45b1c2fc7f0c064a6c58968416e4
2021-11-01 09:20:00 +01:00
James D. Forrester
20fd877da4 Drop experimental FileJournal system without deprecation
The feature was introduced in 2012 with d19f54602f (just before
the gerrit migration).

Change-Id: Ia3f59ad0ddeb1f610947b14e22b0694ff4c6ed84
2021-11-01 14:08:09 +11:00
Derick Alangi
29ddb9b716 tests: Merge test cases into data provider & remove helper method
NOTE: Deprecated `Http::isValidURI()` was updated to the recommended
method code.

Change-Id: I419f18a43278ca5926047037cecb4fa9bcb2017a
2021-10-31 19:58:49 +01:00
jenkins-bot
1d5332977b Merge "resourceloader: Remove use of Timing class" 2021-10-30 06:52:33 +00:00
jenkins-bot
1223ffe800 Merge "objectcache: remove "onHostRoutingPrefix" feature from WANObjectCache" 2021-10-30 05:40:24 +00:00
Aaron Schulz
6465b9f60e objectcache: remove "onHostRoutingPrefix" feature from WANObjectCache
This feature no longer seeems to be needed at this time and is
not worth the complexity in that case.

Bug: T264604
Bug: T288702
Change-Id: I059ab57236ab2281183110bd65dcf23b1fa7405d
2021-10-30 05:19:47 +00:00
Aaron Schulz
be0af1a960 rdbms: improve clarity of Database::canRecoverFromDisconnect and add logging
Bug: T281451
Change-Id: I014a56d97008e7dd32b7dc59964ee8158a1b0ca5
2021-10-29 20:37:35 -07:00