Commit graph

77454 commits

Author SHA1 Message Date
jenkins-bot
0dffe07c6e Merge "htmlform: Fix double escaping in Label div" 2024-03-19 22:34:30 +00:00
jenkins-bot
4535b1049a Merge "HTMLFormField: Codex CSS-only version of HTMLRadioField" 2024-03-19 21:06:05 +00:00
jenkins-bot
7cf65ac6c1 Merge "MoveLogFormatter: Don't show revert link if the destination doesn't exist" 2024-03-19 20:49:45 +00:00
Ammarpad
7d795d4fc7 htmlform: Fix double escaping in Label div
Bug: T360381
Follow-up: Iab3f3c81f4de034a3a04b54caf269de6fde4a7f2
Change-Id: I56ffc4b6c194e3115a7c9986d3639d5831288155
2024-03-19 21:22:41 +01:00
James D. Forrester
8e940c4f21 Standardise all our class alias deprecation comments for ease of grepping
Change-Id: I7f85d931d3b79da23e87b4e5692b2e14be8fcaa0
2024-03-19 20:11:29 +00:00
lwatson
3df492fcca HTMLFormField: Codex CSS-only version of HTMLRadioField
Adds a CSS-only version of Codex Radio via HTMLRadioField.
Iterates through the list of options obtained from `getOptions()`
and generates the HTML markup for each radio input, radio icon,
and radio label. The three elements (input, icon, label)
combined make a single Codex Radio. The Radios are appended to
an empty `$html` string variable. The function returns the
concatenated HTML markup.

Bug: T359015
Change-Id: I73b2e95cff0bc50ba1bc70457d65e286592288ac
2024-03-19 16:07:08 -04:00
jenkins-bot
a85318480d Merge "api: Make changes after pagelinks migration" 2024-03-19 19:32:39 +00:00
jenkins-bot
0e879321d3 Merge "upload: Fix signature of PublishStashedFileJob for php8.0" 2024-03-19 19:17:38 +00:00
jenkins-bot
c19f0ae0f1 Merge "objectcache: Deprecate SerializedValueContainer::isUnified()" 2024-03-19 18:18:29 +00:00
jenkins-bot
9aeaa4bce4 Merge "deferred: Migrate deferred updates metric to StatsLib" 2024-03-19 17:57:14 +00:00
Derick Alangi
b3b491d292
objectcache: Deprecate SerializedValueContainer::isUnified()
Since the method for constructing a serialized value container via
`newUnified()` has been removed in Id5179be032d45732db659d506d2781,
its corresponding `isUnified()` method is now obsolete and this
patch deprecates it to be removed in 1.43.

Bug: T344521
Change-Id: I5a90028c2a596dfec9a1df306cc9d0ab90dfedd6
2024-03-19 13:28:51 +03:00
jenkins-bot
24d0d9514e Merge "block: Fix exception in ApiQueryBlocks when specified users are not blocked" 2024-03-19 10:06:48 +00:00
Tim Starling
51bceb0faf block: Fix exception in ApiQueryBlocks when specified users are not blocked
Fix exception due to empty array passed to makeList() for bt_id.

Bug: T360088
Change-Id: I1336923976aae02bb4a4013c2cefa0a3629bc99a
2024-03-19 20:34:55 +11:00
Translation updater bot
39af550504 Localisation updates from https://translatewiki.net.
Change-Id: I2cc808261ab935bb4d8e6796301d9635dda42bad
2024-03-19 08:07:10 +01:00
Tim Starling
768fd92fc0 block: Clarify function of HideUserUtils aliases and use them consistently
* Add a comment explaining why we need table aliases in HideUserUtils
  subqueries.
* Use the table aliases consistently in inner field references. While
  this does not appear to be strictly necessary, since unprefixed fields
  refer to the inner query by default, it helps to improve the clarity
  of the code.

Change-Id: Id68684ea12060a259dc87e66edd63b925da2c3b1
2024-03-19 11:31:03 +11:00
jenkins-bot
873346377d Merge "block: Fix DatabaseBlockStore::newLoad index usage" 2024-03-18 23:57:04 +00:00
jenkins-bot
4c683d23e2 Merge "block: In UsersPager use a subquery instead of HAVING()" 2024-03-18 23:56:56 +00:00
jenkins-bot
01e48eeb33 Merge "Add additional IP range validation to isValid function" 2024-03-18 23:10:17 +00:00
Amir Sarabadani
2ffa5b8f38 api: Make changes after pagelinks migration
This fixes most of cases mentioned in the ticket

Bug: T359425
Change-Id: Idd13d30a1590c7b9ccbca5e80ae5212ced7d948e
2024-03-18 21:29:36 +01:00
jenkins-bot
7e58353c50 Merge "HTMLForm: Use rows=10 instead of rows=25 for Codex multiselect fields" 2024-03-18 19:49:19 +00:00
Umherirrender
22fcf94823 upload: Fix signature of PublishStashedFileJob for php8.0
Seen in CI for php8
PHP Fatal error:  Declaration of PublishStashedFileJob::getUpload() must
be compatible with UploadJobTrait::getUpload(): UploadBase in
/workspace/src/includes/jobqueue/jobs/PublishStashedFileJob.php on line
68

Follow-Up: I28d0be0239f3b25efc6ea8bc3d400b9d0f5bc7bf
Change-Id: Icb516ac1cfffd9589aa047aa8450c49bc1ab2379
2024-03-18 19:47:53 +01:00
Roan Kattouw
40d2280079 HTMLForm: Use rows=10 instead of rows=25 for Codex multiselect fields
The Codex implementation of HTMLNamespacesMultiselectField and
HTMLTitlesMultiselectField falls back to a simple `<textarea>`, which is
also what the OOUI implementation does if JS is not available. However,
OOUI sets rows=10, which results in a much more reasonably sized
textarea then HTMLTextAreaField's default of rows=25.

Pass rows=10 to HTMLTextAreaField, but allow the field params to
override this.

Change-Id: I1e9a1ab6b4a71fb247bfe7861a49bb6cfeb61f54
2024-03-18 11:43:11 -07:00
jenkins-bot
1c00bfdcbe Merge "config: Drop SiteConfiguration::getConfig()" 2024-03-18 16:53:42 +00:00
jenkins-bot
802c0c0d74 Merge "objectcache: Drop SerializedValueContainer::newUnified()" 2024-03-18 13:46:14 +00:00
jenkins-bot
7a3c5b29de Merge "Fix some spelling errors" 2024-03-18 10:53:55 +00:00
Tim Starling
bd6ed0acdf Fix some spelling errors
Change-Id: I3632ce1ae00527f806652deb96cafb473aed3dcf
2024-03-18 20:58:11 +11:00
Derick Alangi
cdd6a026f9
config: Drop SiteConfiguration::getConfig()
This patch deletes the `::getConfig()` method in the SiteConfiguration
class. It's no longer used and due for removal.

Bug: T289543
Change-Id: Ie94b95feb7fd0885b7c224533868e654453071cd
2024-03-18 12:54:18 +03:00
Derick Alangi
1f3be17f06
deferred: Migrate deferred updates metric to StatsLib
Bug: T360290
Change-Id: I1076b10a77723dbab4262f41a4e3c295d49c4a6a
2024-03-18 12:52:37 +03:00
Derick Alangi
77ec7bf998
objectcache: Drop SerializedValueContainer::newUnified()
This patch deletes the `::newUnified()` method from this class, it's
already hard deprecated and due for removal.

Bug: T344521
Change-Id: Id5179be032d45732db659d506d2781752f03f8be
2024-03-18 12:50:22 +03:00
Translation updater bot
7f9a5b6858 Localisation updates from https://translatewiki.net.
Change-Id: I4f52e4544898dafa3ba7353ab96e7490f6e0e989
2024-03-18 07:43:49 +00:00
jenkins-bot
9475c3c71d Merge "REST: Accept POST with empty body and no content-type" 2024-03-18 04:46:18 +00:00
Tim Starling
652ac0b375 block: Fix DatabaseBlockStore::newLoad index usage
There's no index on bt_user_text alone, only one that is prefixed with
bt_ip_hex. So include a condition on bt_ip_hex when searching for blocks
by username.

Bug: T360165
Change-Id: I99ed17ed66449ab7c3f76c98d90f91a75fbd8fd5
2024-03-18 09:36:33 +11:00
jenkins-bot
f254f8b6c1 Merge "block: Use a scalar subquery in HideUserUtils::getExpression" 2024-03-17 22:21:29 +00:00
jenkins-bot
9f0d6eea0a Merge "Split web-specific code out of DatabaseInstaller" 2024-03-16 21:13:59 +00:00
jenkins-bot
8fd74cf1cf Merge "Type hint IReadableDatabase on IConnectionProvider::getReplicaDatabase" 2024-03-16 21:08:16 +00:00
jenkins-bot
1ec52fd0a1 Merge "Type hint IReadableDatabase in WatchedItemQueryServiceExtension" 2024-03-16 21:06:20 +00:00
Umherirrender
21f0934037 Type hint IReadableDatabase on IConnectionProvider::getReplicaDatabase
Only docs needs adjust, but phan is using this needs changes in the
search related classes.
Doc change in IForeignRepoWithDB is needed, the implementation in
LocalRepo returns the value from IConnectionProvider::getReplicaDatabase

Change-Id: I01a1aa0ddbc756226d8e3404ac1cc3350ad5df64
2024-03-16 16:02:11 +00:00
Umherirrender
f1d1b44d1c Type hint IReadableDatabase in WatchedItemQueryServiceExtension
Change-Id: I0de9c64c3abde7a89290f37c75705b2ed1ba17cf
2024-03-16 16:01:47 +00:00
jenkins-bot
f5cf29113a Merge "Add temporary feature flag for logout confirmation" 2024-03-16 11:52:54 +00:00
hmonroy
5c78508628 Add temporary feature flag for logout confirmation
Add a temporary feature flag that is going to be covering the work
around implementing a logout confirmation.

Bug: T357484
Change-Id: I3ee8f52976cb956e24f32115c02903c5c4f358c3
2024-03-15 19:05:47 -07:00
jenkins-bot
23728ecc4e Merge "HTMLFormField: Use Codex TextArea for multiselect fields" 2024-03-15 23:02:39 +00:00
jenkins-bot
4d2c9162ff Merge "Fix QueryBuilderFromRawSql::buildQuery()" 2024-03-15 22:51:45 +00:00
Tim Starling
d23c174390 filebackend: Retry Swift requests with new auth token on 401
Every Wednesday, we get hundreds of user-visible storage failures,
because there is only one global storage token and it has a lifetime of
one week. The code assumes that requesting a token regularly will avoid
expiry, but that is not the case.

So, when a request fails with a 401, refresh the auth token, then retry
the request. Factor out HTTP request handling to allow this.

Swift gives us the remaining lifetime of the token in seconds, so use
that as the server and process cache expiry time. There will be a
stampede when it expires, but my laptop can do 700 req/s single-
threaded, so it should be OK.

Add tests to cover the cases previously handled by checking the return
value of getAuthentication().

Bug: T358830
Change-Id: If9fe4dde4127592adae1b81e8eb925c4f59443d9
2024-03-15 21:34:36 +00:00
jenkins-bot
675486d254 Merge "externalstore: use QUERY_CHANGE_SCHEMA when initializing tables" 2024-03-15 20:44:33 +00:00
jenkins-bot
0cd1179fe6 Merge "block: In ApiQueryBlocks use a union when querying for both users and IPs" 2024-03-15 19:17:18 +00:00
jenkins-bot
e5b97a8914 Merge "rdbms: Add fetchRow etc. to UnionQueryBuilder" 2024-03-15 19:13:10 +00:00
jenkins-bot
ba2af23eff Merge "RenameUserJob: Migrate from LoadBalancer to IConnectionProvider" 2024-03-15 19:09:59 +00:00
Gergő Tisza
ca1971a3c5
Fix QueryBuilderFromRawSql::buildQuery()
QUERY_CHANGE_[SCHEMA|LOCKS] includes QUERY_IGNORE_DBO_TRX, which
messed up the write query detection logic which assumed a lone
QUERY_IGNORE_DBO_TRX flag is enough to fulfill the condition
that the query has either some read query flag or some write
query flag. Query::isWriteQuery() (correctly) disagreed and that
lead to exceptions thrown in some cases.

Bug: T358236
Change-Id: I8cd2d85e96d52158f9fb5462be2df5c07d0e982a
2024-03-15 16:48:33 +01:00
Piotr Miazga
b5c913fd00 externalstore: use QUERY_CHANGE_SCHEMA when initializing tables
ExternalStoreDB table initialization fails in Query:isWriteQuery(),
as Query couldn't determine if it is a write query.
ExtenrlaStoreDB should use ::QUERY_CHANGE_SCHEMA flag instead.

Bug: T358236
Change-Id: Ib23d7ff4b23c7dbb4a2d66ffcf03dc256136f024
2024-03-15 13:28:56 +01:00
Cole White
d9eafc96bb ServiceWiring: pass StatsFactory instance to ParserCacheFactory
Bug: T356815
Change-Id: Iaee83b48ffb44b9d67bd8f203a9d92dcf2032be1
2024-03-15 10:16:48 +00:00