Commit graph

125151 commits

Author SHA1 Message Date
Ebrahim Byagowi
fab78547ad Add namespace to the root classes of ObjectCache
And deprecated aliases for the the no namespaced classes.

ReplicatedBagOStuff that already is deprecated isn't moved.

Bug: T353458
Change-Id: Ie01962517e5b53e59b9721e9996d4f1ea95abb51
2024-07-10 00:14:54 +03:30
jenkins-bot
0985ed781c Merge "mediawiki.specialblock: Select to block last IP by default" 2024-07-09 12:36:12 +00:00
Translation updater bot
839e38173c
Localisation updates from https://translatewiki.net.
Change-Id: I580366e9838482844f1db700dc3337daba6b1cef
2024-07-09 09:07:50 +02:00
jenkins-bot
8eaf4e5fda Merge "Use ES6 const/let in mediawiki.action.edit.editWarning" 2024-07-08 22:54:26 +00:00
jenkins-bot
d3d8f0787d Merge "Use more modern JS syntax in mediawiki.action.protect" 2024-07-08 22:54:19 +00:00
jenkins-bot
8465c74fc0 Merge "Turn mediawiki.widgets.Table styles from CSS to LESS" 2024-07-08 22:49:31 +00:00
jenkins-bot
d6e95491c2 Merge "Turn mw.widgets.SelectWithInputWidget.base from CSS to LESS" 2024-07-08 22:44:48 +00:00
jenkins-bot
c5771c9c30 Merge "AuthManager: Read from primary in account autocreation" 2024-07-08 19:43:33 +00:00
jenkins-bot
b3ecbf29ec Merge "REST: Enable strict type validation in JSON request bodies" 2024-07-08 19:29:52 +00:00
Kosta Harlan
742fd566bf AuthManager: Read from primary in account autocreation
Why:

- User::loadFromId must avoid doing a replica read when the newly
  autocreated user record isn't replicated yet; that would turn $user
  into an anonymous user object, and eventually log the user out.
  The old code tried to avoid this by using the same recency flag
  for which UserIdentityLookup::getUserIdentityByName() returned a
  non-anonymous user identity, but that's not actually a guarantee
  that the user is in the database, because getUserIdentityByName()
  has an internal in-process cache.
- For a specific example of this, Icf6be65a91437aa32684769c2858 broke
  temp account autocreation because inserting the log entry triggered
  ActorNormalization::acquireActorId() which set the in-process cache.
  With this patch applied, temp account autocreation will work again
  on wikis with database replication setup.

What:

- Use READ_LATEST flag when loading a user in an account
  autocreation context
- See also I5456f88ebb78d2fcac685efd4a1f7a9f60d2bc0e for a proposed
  follow-up to this patch

Bug: T369372
Change-Id: I04932d84aa0b0b5939706f3905f0fe7700d81327
2024-07-08 19:18:29 +00:00
Ebrahim Byagowi
423d222ea5 Turn mediawiki.widgets.Table styles from CSS to LESS
They have repetition of selectors which can be improved using LESS.

Change-Id: I78971a0040c8986b71b0cec5044a489fd18fb8b2
2024-07-08 22:17:23 +03:30
jenkins-bot
6d58c6b43a Merge "Replace some uses of raw SQL with expression builder" 2024-07-08 18:18:06 +00:00
Ebrahim Byagowi
9d93e4faf5 Turn mw.widgets.SelectWithInputWidget.base from CSS to LESS
The repeated selectors the file has benefits from LESS.

Change-Id: Ie374e46434f423666321f9251d027e522c3b2604
2024-07-08 21:45:57 +03:30
jenkins-bot
5892a10274 Merge "Convert mw.widgets.SizeFilterWidget.base.css to less" 2024-07-08 18:00:12 +00:00
jenkins-bot
b9a9a792d6 Merge "Normalise string params in MW Rest API" 2024-07-08 17:45:39 +00:00
Wendy Quarshie
5c61c65541 Normalise string params in MW Rest API
Bug: T340185
Change-Id: I1b7189d5951dea019897955f8f9749afcc325fe0
2024-07-08 17:20:14 +00:00
jenkins-bot
9ff2389ce1 Merge "Turn CSS styles of mediawiki.widgets.styles to LESS" 2024-07-08 16:52:32 +00:00
jenkins-bot
f3de855baa Merge "SkinComponentCopyright: Handle null context title" 2024-07-08 16:36:44 +00:00
jenkins-bot
dbe653904a Merge "Bump wikimedia/parsoid to 0.20.0-a12" 2024-07-08 14:30:01 +00:00
jenkins-bot
63442e8cf8 Merge "Introduce hook to preserve query params after authentication" 2024-07-08 14:20:42 +00:00
jenkins-bot
dd9c55b5f6 Merge "Use ES6 destructuring in mediawiki.widgets.visibleLengthLimit.js" 2024-07-08 14:04:32 +00:00
Ebrahim Byagowi
5adb425f48 Use ES6 const/let in mediawiki.action.edit.editWarning
To test this simply open the wiki editor in some page, apply some
edit and try to go somewhere else.

Change-Id: Iee3c194daddf280784e9a697eedffae61b833f04
2024-07-08 16:46:20 +03:30
Ebrahim Byagowi
8477c6815d Use more modern JS syntax in mediawiki.action.protect
Uses ES6 arrow functions and const/let assignments.

It favors JavaScript's map over jQuery's one as the former
doesn't tweak this which isn't used by ES6 arrow functions anyway.

Change-Id: I133f11479c10de2a5743f626fa6c1eeb1404a778
2024-07-08 16:39:02 +03:30
Ebrahim Byagowi
ac500ae5ea Turn CSS styles of mediawiki.widgets.styles to LESS
Their repeated selectors benifits from LESS existence.

Change-Id: I8868dd2809a5f0fb5a3df676d8285fd3f3cfe490
2024-07-08 16:35:02 +03:30
Ebrahim Byagowi
9af0b1d1fe Convert mw.widgets.SizeFilterWidget.base.css to less
LESS is beneficial for it's repetitions it has in it's selectors.

Change-Id: Ibf6e55a0ec4090dd1ca10206393e98d075aab091
2024-07-08 16:22:21 +03:30
Ebrahim Byagowi
086c60538c Use ES6 destructuring in mediawiki.widgets.visibleLengthLimit.js
Change-Id: I4e1fed8850831ff8acb3221a32e81b704724d5d9
2024-07-08 15:46:41 +03:30
jenkins-bot
64609d6520 Merge "Use ES6 const/let in mediawiki.action.edit.preview" 2024-07-08 12:07:33 +00:00
jenkins-bot
f2b8175814 Merge "Modernize mediawiki.action.view.metadata.js" 2024-07-08 12:07:17 +00:00
Derick Alangi
493ffea9e9
Introduce hook to preserve query params after authentication
This hook enables extensions such as CentralAuth to preserve and
use query parameters needed for an authentication flow. Since there
is a provider that handles logins in a different wiki (central login
wiki), and movement to a different URL, this hook preserves query
parameters that can be used between these requests.

Bug: T363483
Bug: T362713
Change-Id: I86e629b07e6e4a0f1d1a4c78a6c77d41b4d68e18
2024-07-08 13:37:54 +02:00
Yiannis Giannelos
2f238a944c Bump wikimedia/parsoid to 0.20.0-a12
Bug: T369310
Depends-On: I0f1c644729396b4a9fee6f3e4374d24d7bb7ac9d
Change-Id: Ibc37f7bff616c82da4a4a3337b53e79b2abba689
2024-07-08 12:29:46 +02:00
jenkins-bot
d3d99e8d47 Merge "specials: Use username from query on Special:ProtectedPages" 2024-07-08 10:13:18 +00:00
Ebrahim Byagowi
7685e9669f Use ES6 const/let in mediawiki.action.edit.preview
Also add a 'use strict' just in case.

This is used for live edit preview which can be enabled editing section of the preferences.

Change-Id: I6a5ac020d84d333605af88a4efb5d19fd79e7b98
2024-07-08 12:09:30 +03:30
Translation updater bot
015321f8f3
Localisation updates from https://translatewiki.net.
Change-Id: I231e31fe00031cefaeba180bea33054fe72e29e7
2024-07-08 09:07:30 +02:00
jenkins-bot
dbfb13a6c3 Merge "objectcache: Deprecate unused methods in BagOStuff.php" 2024-07-08 02:41:38 +00:00
jenkins-bot
3855e7333a Merge "maintenance: Hint at better replacements for deprecated fields" 2024-07-08 02:33:57 +00:00
Derick Alangi
05246f6921 objectcache: Deprecate unused methods in BagOStuff.php
These methods: getSegmentationSize() and getSegmentedValueMaxSize()
in both the BagOStuff.php and MediumSpecificBagOStuff classes seem
unused for a while now. Codesearch shows that we have no callers of
both the parent and child class overrides.

Since these are public interfaces, they'll have to go through the
deprecation process.

Introduced in b09b3980f9 (I0667a02612526d8ddfd91d5) and later
in 2021, usage was all removed in 942f708b61 (I5c4bd74379bc45).

Change-Id: Ie529841e673abc7b68f870539dbb23a34a292c89
2024-07-08 02:18:49 +00:00
jenkins-bot
f4002236ea Merge "Drop an extra early return in mediawiki.action.history" 2024-07-07 23:47:33 +00:00
Bartosz Dziewoński
a5ae26d9e2 SkinComponentCopyright: Handle null context title
This can occur in tests (e.g. ApiFormatBaseTest).
Follow-up to b855c62f66.

Change-Id: I7a455c917552189afb1cba38164b4fae38ff9971
2024-07-08 00:14:20 +02:00
jenkins-bot
c19674a8a2 Merge "specials: Replace ISQLPlatform::makeList on ChangesListSpecialPages" 2024-07-07 21:26:43 +00:00
Bartosz Dziewoński
2e3aa6cb4d Replace some uses of raw SQL with expression builder
I noticed these while reviewing other changes to the code.

Change-Id: If548eb937ba36c94d652ec2f881ce668ea1df21d
2024-07-07 23:22:21 +02:00
jenkins-bot
5f723028fb Merge "api: Replace ISQLPlatform::makeList in list=recentchanges" 2024-07-07 21:07:56 +00:00
Ebrahim Byagowi
e8002b9fa4 Drop an extra early return in mediawiki.action.history
This shouldn't be needed as iterating over an empty array is no-op anyway.

Also 'use strict' and ES6 let/const.

Change-Id: I5f1073dbcfcc42d8e10fec191b35d7aca293d104
2024-07-08 00:08:29 +03:30
jenkins-bot
3184f0532d Merge "api: Fix incomplete docs for ApiPageSet::$mRequestedPageFields" 2024-07-07 20:28:05 +00:00
jenkins-bot
f38593f942 Merge "api: Use much more specific PHPDoc type hints in ApiPageSet" 2024-07-07 20:08:06 +00:00
jenkins-bot
04d5f1ae5f Merge "HTMLForm: Prepare Less styles for math=parens-division" 2024-07-07 20:00:27 +00:00
jenkins-bot
64d0d1b192 Merge "FormSpecialPage: Allow "0" parameter via subpage syntax" 2024-07-07 19:46:38 +00:00
Ebrahim Byagowi
006861bee0 Modernize mediawiki.action.view.metadata.js
Use ES6 arrows and const/let assignment.

Also remove uses of 'this' as incompatiblity with ES6 arrows
which leads to easier to reason about the code also.

Change-Id: I5acea39281ccc183deeddefa74d1754cfaaefbc7
2024-07-07 21:26:52 +03:30
Matěj Suchánek
17f597b5c2 FormSpecialPage: Allow "0" parameter via subpage syntax
Steps to reproduce: visit [[Special:WhatLinksHere/0]].

Change-Id: Id837bcb2ac386ca5ef70af2fd3ddb98277aa99cd
2024-07-07 19:06:17 +02:00
jenkins-bot
41e384528d Merge "Modernize JavaScript of mediawiki.action.view.redirect.js" 2024-07-07 16:48:12 +00:00
thiemowmde
2cbce841c4 maintenance: Hint at better replacements for deprecated fields
I believe these methods are what should be used in
maintenance scripts, not anything that literally starts with
$this->parameters->…

Change-Id: I5a2d19475834386e03146985ed9e5a5cd4ae1c52
2024-07-07 16:45:29 +02:00