Commit graph

106750 commits

Author SHA1 Message Date
Ed Sanders
ecec1477a6 maintenance: Add --parse-title option to edit.php to parse the title input
Allows scripts to edit pages that can vary by language, e.g. "{{int:mainpage}}"
or target pages using parser variables, e.g. "News_{{CURRENTYEAR}}".

Change-Id: I94bd613d34743739c6529f22c1dcccc27acc4e8b
2021-12-03 00:04:43 +00:00
Timo Tijhof
f913f4d29c Update wikimedia/minify to 2.2.5
Changes since 2.2.4:

* Fix minify CLI to work from within vendor directory.
* Remove true/false !0/!1 micro optimisation. (T237042)

Depends-On: Id2f2061ac5c7389840b73ad138a91df73a40877f
Change-Id: I1f437781dd8f0cea516693a6e15fe3f95a0aa2ad
2021-11-11 22:19:51 +00:00
jenkins-bot
d45cab7c46 Merge "Update deprecated Guzzle Psr7 function calls" 2021-11-11 16:41:57 +00:00
jenkins-bot
d4c92c6fd4 Merge "Use ParserCache for local file description renders" 2021-11-11 16:40:54 +00:00
Reedy
2d27b46802 Update deprecated Guzzle Psr7 function calls
Change-Id: If7cc461559d4857a7bae8b71cc8283fbabfe9a28
2021-11-11 16:00:34 +00:00
jenkins-bot
bb728b803a Merge "Move Content::prepareSave to ContentHandler" 2021-11-11 15:31:19 +00:00
Petr Pchelko
47e8872398 Use ParserCache for local file description renders
Currently for every File page view, if the file is local,
CommonsMetadata extension renders the file page twice -
once to extract the metadata, and once to show the page.
Metadata extraction parse was always uncached, so let's
at least use PoolCounter and ParserCache for this parse.

Bug: T292302
Change-Id: If6e1a1a72d794f4fb87105b7528ea0afe92a585f
2021-11-11 15:00:32 +00:00
Roman Stolar
5461404d69 Move Content::prepareSave to ContentHandler
Update method name in ContentHandler, soft-deprecate method on Content.
This will require making a semi-backwards-incompatible
change no matter what, we don't really have a great way
of hard-deprecating overriding methods.
Replace all callers of Content::prepareSave in core.

Add tests for ContentHandler::validateSave.

Bug: T287159
Change-Id: I7f23e6e97b1c7d27a6aaefdb88b19b2fc6e8b3a8
2021-11-11 15:40:42 +02:00
jenkins-bot
85c0575e9a Merge "Localisation updates from https://translatewiki.net." 2021-11-11 09:40:53 +00:00
jenkins-bot
33c1b3280d Merge "LoginSignup: Add function for overriding benefits container" 2021-11-11 09:02:52 +00:00
Translation updater bot
c918fb142a Localisation updates from https://translatewiki.net.
Change-Id: Ia4d0f26c93813ce57c19de8a7008b03f4b8b8c56
2021-11-11 09:47:06 +01:00
Yuki Shira
15563022cf DjVu: Update @since tag from 1.37 to 1.38 for $wgDjvuShell
Follow-Up: Ic4e3dff246792692a952da0e8f9b4a83d1b6b963

Change-Id: I27fd8dab883867e99d9061067151241231e42280
2021-11-11 00:22:07 +00:00
jenkins-bot
7061fd2ee2 Merge "Reapply "Move limit report rendering to ParserOutput"" 2021-11-11 00:19:44 +00:00
jenkins-bot
d132545236 Merge "resourceloader: Fix indent in ResourceModules docs for "es6" option" 2021-11-10 21:20:26 +00:00
Timo Tijhof
923a605856 resourceloader: Fix indent in ResourceModules docs for "es6" option
Follows-up b267f7aa90.

Change-Id: I9cd17e177bed544aa5ca4a01e150cba5ca4f1c79
2021-11-10 20:07:59 +00:00
Aaron Schulz
61c6b312e0 objectcache: make CACHE_MEMCACHED alias "memcached-php"
This avoid duplicating the "memcached-php" instance/connections

Change-Id: I2a9a8182c064c326e9320d82774c5470424a5cfe
2021-11-10 18:55:47 +00:00
jenkins-bot
f47a6ef583 Merge "media: Port DjVuImage::retrieveMetaData() to use BoxedCommand" 2021-11-10 17:06:45 +00:00
jenkins-bot
f66e15e99c Merge "rdbms: Reduce time precision in DBPerformance messages to 3 digits" 2021-11-10 11:35:00 +00:00
jenkins-bot
c253de5c2a Merge "Tweak error message for missing composer dependencies" 2021-11-10 11:25:43 +00:00
jenkins-bot
ba3cb98f0f Merge "Add the Pa'O language (blk) to Names.php" 2021-11-10 08:13:23 +00:00
wctaiwan
0f4a775659 Tweak error message for missing composer dependencies
It wasn't obvious to me that the mediawiki.org link actually pointed
to specific instructions for resolving the error, as opposed to
just telling the user to search on mediawiki.org. Try to make this
a bit more obvious.

Change-Id: Id9a6cf9ee2520db9d405e17eaf34b10bd72897f3
2021-11-10 06:47:56 +00:00
jenkins-bot
a7803df401 Merge "Add linkTrail for several Cyrillic-script languages" 2021-11-10 05:45:55 +00:00
Aaron Schulz
8f6d05e62c objectcache: add watchErrors() to BagOStuff/WANObjectCache
The new style of checking for the last error during a section of
calls is more robust since it allows nesting of callers. Typically,
an external caller will want to watch a section of code that will
involve zero or more internally watched sections. Errors that are
seen internally (leading to a failing response) should also be
visible externally.

Replace internal BagOStuff clearLastError() calls.

Replace WANObjectCache clearLastError() calls. Such a class should not
clear the error codes since the class is effectively "internal". Callers
that are more meaningfully "external" might want to check the errors.

Cleanup "last" error handling for proxy backends.

Change-Id: I281817a85602967c0ec2bdd23a5d8be101680b64
2021-11-10 00:38:27 +00:00
Timo Tijhof
526fb0cf7d rdbms: Reduce time precision in DBPerformance messages to 3 digits
Slow fatal, before:

> DBTransactionSizeError:
> Transaction spent 3.016772747039795 second(s) in writes,
> exceeding the limit of 3

After:

> DBTransactionSizeError:
> Transaction spent 3.016s in writes, exceeding the 3s limit

Fast debug, before:

> [DBPerformance] Transaction spent 0.015979528427124 second(s) in
> writes, less than the limit of 3

After:
> [DBPerformance] Transaction spent 16ms in writes, under the 3s limit

Test plan:
* Set `$wgMaxUserDBWriteDuration = 3;` in LocalSettings.php.
* Perform a db-writing user action, such as an edit.
* Check mw debug log.
* Set `$wgMaxUserDBWriteDuration = 0.0001;` in LocalSettings.php,
  and ensure `$wgShowExceptionDetails = true;` is set as well
  (default if using official dev environments, or otherwise
  including DevelopmentSettings.php, otherwise check exception log),
  or add an artificial delay in DatabaseMysqli::doQuery().
* Perform a user action, and observe the fatal error.

Change-Id: Ice91ad25a836c4d9a824f9c0f6ec8debaad46adc
2021-11-10 00:19:10 +00:00
jenkins-bot
b3b4bdaeea Merge "ShellboxClientFactory: add RPCClient getters" 2021-11-09 22:43:14 +00:00
jenkins-bot
ef59b75ba1 Merge "language: Use property LanguageConverter::mUserVariant for optimisation" 2021-11-09 22:40:35 +00:00
Tim Starling
12cac7cca9 LockManager: distinguish conflicts from other kinds of lock errors
With a user-friendly error message which uses both technical and
non-technical language, without the irrelevant detail of filebackend
URLs.

Bug: T283045
Change-Id: I8704f405d38acdffae7bd4ea5b91f3f591fc2ebc
2021-11-09 21:58:20 +00:00
jenkins-bot
2b9cabf5b3 Merge "build: Update eslint-config-wikimedia to 0.21.0" 2021-11-09 21:38:15 +00:00
jenkins-bot
4f15011bb1 Merge "resourceloader: Use UserIdentity in some cases" 2021-11-09 21:36:08 +00:00
jenkins-bot
73170eddad Merge "resourceloader: Fix null type docs for FileModule::getPackageFiles" 2021-11-09 21:36:02 +00:00
Kunal Mehta
9834e56f38 media: Port DjVuImage::retrieveMetaData() to use BoxedCommand
The shellouts to djvudump and djvutxt are combined with a wrapping shell
script, scripts/retrieveMetaData.sh so the djvu file only needs to be
transmitted to a Shellbox service once.

Windows users can change the new $wgDjvuShell setting to point to a
different shell.

Bug: T289228
Change-Id: Ic4e3dff246792692a952da0e8f9b4a83d1b6b963
2021-11-09 22:13:37 +01:00
Ed Sanders
9fe2995989 build: Update eslint-config-wikimedia to 0.21.0
* Replace `substr`/`substring` with `slice`. The second argument
  to `substring` is length, not end index as in `substr`/`slice`,
  so convert where necessary.
* Replace `new Date().getTime()` with `Date.now()`
* Documentation fixes
* Replace `throw Error` with `throw new Error`

Change-Id: I532500ea4c99d8ebec01efb21273c8df21626e59
2021-11-09 21:08:55 +00:00
Umherirrender
396444940c resourceloader: Fix null type docs for FileModule::getPackageFiles
The null check for the class property packageFiles needs change to
check the return value of the function instead, because Phan would
report an issue that a null value is used in the foreach.

Phan does not understand the relation between the return value and the
class property.
When using a local variable then Phan can check
that the value is never null when used.

Change-Id: I48ac8a8fe55ae7b4e13bc94d2f2d2ede01fbc68b
2021-11-09 21:04:27 +00:00
jenkins-bot
8e1ab4f1fe Merge "Make DeleteAction and FileDeleteAction share showForm" 2021-11-09 20:52:49 +00:00
Umherirrender
e535eb1e6e language: Use property LanguageConverter::mUserVariant for optimisation
The property was set, but never read. Use it similar to
mHeaderVariant/mURLVariant and return the value when set.

Originally introduced without caching (r60961, 81f62b6f61) but had no
clear explanation. The unclear comment was removed in I62bd09d7d0.

Change-Id: I863d77618c7f26686ae4de76024878655f516e04
2021-11-09 20:52:00 +00:00
jenkins-bot
d4c2122b15 Merge "Update doctrine/dbal versions" 2021-11-09 19:27:12 +00:00
Ppchelko
643fc535c3 Reapply "Move limit report rendering to ParserOutput"
This reverts commit 2bcb3fe567.

Reason for revert: this is a good change,
just needed more work to not break CI

Change-Id: I23768bee242e3cf81b1493a740cf070e7ad1e224
2021-11-09 11:08:08 -08:00
Reedy
efdf87ba5f RELEASE-NOTES-1.37: Prepare for 1.37.0-rc.2
Change-Id: I6b2a1e76b573b4a7f6fb12f405fee951703c4f70
2021-11-09 18:21:05 +00:00
vladshapik
8d2be7706d Drop User::getRights()
Deprecated since 1.34 and unused.

Bug: T277511
Change-Id: Ia798c62cdfe6ad6c6d7af8d68b95231883a071fe
2021-11-09 19:20:41 +02:00
jenkins-bot
80d3ece54a Merge "Revert "Move limit report rendering to ParserOutput"" 2021-11-09 16:29:57 +00:00
Ppchelko
2bcb3fe567 Revert "Move limit report rendering to ParserOutput"
This reverts commit 89028e0b8e.

Reason for revert: Temporary until we deal with T295357

Change-Id: I556de18dbf900a9bc58d5ae22d1bf194682d0840
2021-11-09 15:57:18 +00:00
jenkins-bot
9f6fa7839a Merge "Vue: Add propsData parameter to Vue.createMwApp()" 2021-11-09 14:29:06 +00:00
jenkins-bot
6e4f771462 Merge "ApiQuerySiteinfo: Fix "rightsinfo"/"url" when $wgRightsPage is set" 2021-11-09 13:15:25 +00:00
Kosta Harlan
58d50a512f LoginSignup: Add function for overriding benefits container
The method is marked unstable, since it's not encouraged to override
this. The HTML construction should be moved to a template / hook based
system.

Also remove deprecated global $wg variable access in favor of injected
Config.

Bug: T295068
Change-Id: I93b559bbb1612608785cf5633e8973c45c421171
2021-11-09 12:30:54 +01:00
Translation updater bot
44b9d834cc Localisation updates from https://translatewiki.net.
Change-Id: Idc06516b2c46d6c71e1b4f9376386c3265a6295e
2021-11-09 07:12:39 +01:00
jenkins-bot
5c5c7d03eb Merge "Update margin rule for menu icons." 2021-11-09 00:10:25 +00:00
jenkins-bot
58f9dc68fc Merge "collation: Improve IcuCollation for static code analyzer" 2021-11-08 23:14:55 +00:00
jenkins-bot
0bacc6a575 Merge "test: Always use strict equalities" 2021-11-08 22:17:31 +00:00
jenkins-bot
4f7a45490b Merge "Move limit report rendering to ParserOutput" 2021-11-08 22:16:18 +00:00
Umherirrender
52631861b1 collation: Improve IcuCollation for static code analyzer
phan says that $this->mainCollator is not documented to get null
assigned.
Use a local variable to check for null and than set the class property.

Change-Id: I000c935da8d99184f2ae0382fc5caac81e80c8d7
2021-11-08 23:11:19 +01:00