Commit graph

106661 commits

Author SHA1 Message Date
jenkins-bot
d9b4c1c0eb Merge "Update OOUI to v0.42.1" 2021-11-04 21:16:31 +00:00
jenkins-bot
f4a02a1c53 Merge "Remove FileOp batch ID" 2021-11-04 20:21:17 +00:00
Volker E
2d25498471 Update OOUI to v0.42.1
Release notes:
 https://gerrit.wikimedia.org/g/oojs/ui/+/v0.42.1/History.md

Bug: T283812
Bug: T287329
Bug: T288928
Bug: T289043
Bug: T289043
Bug: T290792
Bug: T290975
Bug: T291142
Bug: T291284
Bug: T293274
Bug: T293635
Depends-On: I0918c0c866147e6a103ce8815b7a36d0463457b7
Change-Id: I717ff53e18e95c72ace1c46b6236cfecb5cd8217
2021-11-04 19:39:43 +00:00
jenkins-bot
0496e036b5 Merge "REST: gracefully handle all exceptions." 2021-11-04 17:06:28 +00:00
jenkins-bot
51b79a2b73 Merge "Deprecate use of template directory relative to core" 2021-11-04 16:57:15 +00:00
jenkins-bot
6a2f059dda Merge "Improve nullable documentation in Linker class about args" 2021-11-04 11:14:18 +00:00
jenkins-bot
480f18dbc2 Merge "Fix bool documentation for ExplodeIterator" 2021-11-04 10:21:51 +00:00
Translation updater bot
c566a11f9a Localisation updates from https://translatewiki.net.
Change-Id: Iccbfd7c2274e4da7610b6b2f46c80f78734b328e
2021-11-04 09:58:20 +01:00
jenkins-bot
bcfc9ce540 Merge "build: Updating validator to 13.7.0" 2021-11-04 07:18:38 +00:00
Translation updater bot
fdc5ddc9fb Localisation updates from https://translatewiki.net.
Change-Id: Iabd7465ee48d629b53150af1ee8ca8a3e39df671
2021-11-04 07:59:22 +01:00
libraryupgrader
d1266c5646 build: Updating validator to 13.7.0
* https://npmjs.com/advisories/1004784 (CVE-2021-3765)

Change-Id: Iea8fdd4db27df008d81e2298b1871c12dbf5830d
2021-11-04 06:56:01 +00:00
Reedy
19f64435df Update RELEASE-NOTES-1.37
Change-Id: I64414e3e584a5f4cb22d30c1243f51164788e14f
2021-11-04 00:56:47 +00:00
Roan Kattouw
10fae048df Add Vue composition API plugin
Feature code that needs the composition API will need this as long as
we're still on Vue 2. This will also help migrate to Vue 3 more
seamlessly, as working around some breaking changes in Vue 3 requires
using the composition API.

Bug: T251974
Change-Id: I8e334ae5f447a8f9b64a7c910b2c1776cef118db
2021-11-03 23:15:57 +00:00
jenkins-bot
f300c1c51d Merge "Add Vue.createMwApp(), to help with Vue 2->3 migration" 2021-11-03 22:48:45 +00:00
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
daniel
13acba25a0 REST: gracefully handle all exceptions.
ResponseFactory::createFromException already had support for arbitrary
exceptions, but Router was so far only using it for HttpExceptions,
leaving other kinds of exceptions uncaught.

In addition to catching all exceptions and generating an appropriate
JSON response for them, this patch introduces the ErrorReporter
interface, with an MWErrorReporter implementation which calls
MWExceptionHandler::rollbackMasterChangesAndLog(). This is how uncaught
errors are handled for requests coming in via api.php, so it seems
appropriate to use the same approach for requests coming in via
rest.php.

Bug: T285984
Change-Id: I0605a7693821ef58fac80ab67f51a742556a37fd
2021-11-02 20:33:13 +01: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
Umherirrender
907116668e Fix bool documentation for ExplodeIterator
Change-Id: I75ae92caf89e402db77f8d37b096066b2e2c851a
2021-11-02 14:41:52 +01: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
Umherirrender
b9e8cd219f Improve nullable documentation in Linker class about args
Change documentation to null or false where the type is allowed
Also use int on Linker::tocLine, because an int is passed most

Change-Id: I9591ac91586aa9a28f38f80e0ab576b66b303d8d
2021-11-02 11:43:56 +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