Commit graph

127166 commits

Author SHA1 Message Date
Ed Sanders
5a72d16766 mediawiki.router: Convert some instances of let to const.
Change-Id: I59c68476dbde9acd0e8223d07fecfd452d502a6c
2024-10-16 00:38:41 +00:00
Simon Legner
3acd948ed4 mediawiki.router: use this
Thanks to arrow-callbacks, we can use `this` directly.

Change-Id: I31c6280b2d80df8dd9b755d8d36c44f0f3e0f141
2024-10-15 23:42:45 +00:00
jenkins-bot
5a2d2f8df5 Merge "selenium: Fix 'Page should be editable'" 2024-10-08 15:59:54 +00:00
Željko Filipin
0d9b1e699a selenium: Fix 'Page should be editable'
The test was failing because a popup was added to the beta cluster.

Popup text:
Download a browser extension to get new features and help us improve Wikipedia

Bug: T270771
Change-Id: I6ba0026fcaa05610d4a310605f5ff6ae93705bc0
2024-10-08 15:06:39 +00:00
jenkins-bot
566b8c49db Merge "SpecialBlock, mediawiki.htmlform: remove OOUI/Codex conflicts" 2024-10-08 12:01:24 +00:00
jenkins-bot
c74cab847c Merge "Move definition of all bidi control characters to one place" 2024-10-08 10:42:35 +00:00
Ebrahim Byagowi
73388f645c Move definition of all bidi control characters to one place
Bug: T375975
Change-Id: I2b31511608caa59b0a687a92a2ba29dcd4fa1055
2024-10-08 09:42:20 +00:00
Translation updater bot
bca1a4932c
Localisation updates from https://translatewiki.net.
Change-Id: I7a30aa5f44f2db96ae9a5e52c596078361ccfc06
2024-10-08 09:05:09 +02:00
jenkins-bot
3de08aa913 Merge "ExpiryField.vue: fix preselection of expiry field and add tests" 2024-10-08 06:07:07 +00:00
MusikAnimal
092aab36e5 SpecialBlock, mediawiki.htmlform: remove OOUI/Codex conflicts
Instruct Special:Block to only load OOUI and the old JS module
when we're not using Codex.

Fix six year-old bug (from I20d11d7cc4) in mediawiki.htmlform's
selectandother.js where OOUI was incorrectly being assumed, causing
'Widget not found' errors at Special:Block when $wgUseCodexSpecialBlock
is true.

Bug: T358934
Change-Id: Ia959d297ac9043804975f170eec66ddd4c1fe492
2024-10-08 02:04:00 -04:00
MusikAnimal
8087bef18a ExpiryField.vue: fix preselection of expiry field and add tests
With this change, the ?wpExpiry query param and the interface message
[[MediaWiki:Ipb-default-expiry]] accept only the following formats:

* /\d+ [a-z]+s?/ – such as "1 month", "2 weeks", etc.
* infinity values: 'infinite', 'indefinite', 'infinity', 'never'
* ISO 8601-like datestamp

In addition, [[MediaWiki:Ipboptions]] now requires an option be preset
with the value 'infinite'.

Rename `blockDefaultExpiry` to `blockExpiryDefault` for consistency.

Bug: T368583
Change-Id: Ibc648117e6d4981c84e9df9f933ba033d339e908
2024-10-08 00:31:36 -04:00
jenkins-bot
a37de059aa Merge "ParserOutput: ensure all created ParserOutputs have a "start of parse" time set" 2024-10-07 23:13:54 +00:00
jenkins-bot
26b6bf6017 Merge "Document ParserOutput::resetParseStartTime() contract a bit more" 2024-10-07 20:08:22 +00:00
jenkins-bot
c32fb834f2 Merge "signup: Fix AJAX username/password check" 2024-10-07 17:45:20 +00:00
Gergő Tisza
58e5046bb2 signup: Fix AJAX username/password check
Fix form error display logic, doubly broken in If864607cbece8992:
it used too much array dereferencing in the error.length === 1 case
so only the first character of the string was shown, and it passed
a HTML string to messageBox() which expects a DOM node or plain
text. (Ideally, there would be some mechanism similar to
OO.ui.HtmlSnippet that allows passing HTML, but that's left for the
future.)

Also deduplicate the error formatting logic.

Bug: T376428
Change-Id: I053b4bd0cf3d6a0962540a90ae7f6b25129362a4
2024-10-07 19:11:44 +02:00
Arlo Breault
cbbee42053 Bump wikimedia/parsoid to 0.20.0-a24
Bug: T376443
Depends-On: I8107674964fdfd23b370512bb91a1a2626308953
Change-Id: I8400d8f97012f46e23c4dd173a90f4a78067b0e8
2024-10-07 12:28:13 -04:00
jenkins-bot
6e19bef580 Merge "UserSelectQueryBuilder: temp() should not select non-temp users" 2024-10-07 11:29:15 +00:00
Gergő Tisza
5c45ae051b UserSelectQueryBuilder: temp() should not select non-temp users
When temp users are not configured, temp() was a no-op; it should
be the empty condition instead.

Didn't cause any problems (the only caller is
expireTemporaryAccounts.php and that does check the isKnown() flag
first) but would be an easy mistake to make in the future.

Corresponding CentralAuth patch:
I107222c77d8f6dc4caee0db4f706108a2581b4bd

Bug: T372702
Change-Id: I904bbb97b028702ecfe98c97e3f821ba6038e27a
2024-10-07 11:00:16 +00:00
Lucas Werkmeister
91efc7f98e Document ParserOutput::resetParseStartTime() contract a bit more
See Wikibase change I6bba35cea2.

Bug: T376433
Change-Id: Idb6fea7530839f2a769d12b18e6c6703f9e86636
2024-10-07 11:41:08 +02:00
Translation updater bot
db7e41ad76
Localisation updates from https://translatewiki.net.
Change-Id: I5b553e46652ce409459e85675c40982fc61c12f2
2024-10-07 09:05:49 +02:00
jenkins-bot
ab29143ff9 Merge "OutputPage: Remove reference to outdated E_STRICT" 2024-10-06 21:58:29 +00:00
jenkins-bot
5a008aa702 Merge "eslint: Promote 'prefer-const' to error in tests" 2024-10-06 21:44:35 +00:00
Timo Tijhof
c610b0774a OutputPage: Remove reference to outdated E_STRICT
According to https://www.php.net/strtotime, strtotime() can emit
E_WARNING, but not E_STRICT. Anyway, which type of error it emits
doesn't really matter. The cure is the same either way, to use AtEase
or "@" silencing operator, and to explain why.

Remove outdated error code from the explaination, and while at it
replace AtEase with the silence operator (per T253461 and T272554).

Bug: T375707
Change-Id: I641d27b7e73f5ef202f096ceccf16d9f2b89a684
2024-10-06 17:30:57 -04:00
jenkins-bot
92301453de Merge "Deprecate embedBidi the same way as getDirMark" 2024-10-06 20:02:39 +00:00
jenkins-bot
72dac45141 Merge "Use <bdi> in Language::specialList" 2024-10-06 20:01:30 +00:00
Ebrahim Byagowi
f0838fbddc Deprecate embedBidi the same way as getDirMark
With more or less same reasoning as
Ie9b78102d58e81fbc6cb22fb85da4962ee2c70b5

Bug: T375975
Change-Id: Ifd76b98aab30d8d441f0aea6784080fa060b0b83
2024-10-06 22:05:00 +03:30
jenkins-bot
a4a53d00ac Merge "status: Log getMessage()/getWikiText() calls on good Statuses" 2024-10-06 09:53:02 +00:00
jenkins-bot
df17221349 Merge "jobqueue: Mark JobSpecification as newable" 2024-10-06 08:49:58 +00:00
Bartosz Dziewoński
9ea6e73042 eslint: Promote 'prefer-const' to error in tests
Follow-up to 7675004bbe.

Change-Id: Ic0f9acdb0d4ee53fb198c2c0c5ff61c738dd2089
2024-10-06 00:36:52 +02:00
Ed Sanders
50cdd37868 eslint: Manually enforce prefer-const in all remaining code
Change-Id: Ic9f254b55d3936f351ba9c7cc3b553544fc63a58
2024-10-05 22:19:32 +00:00
Ed Sanders
2f3c89ac5d eslint: Manually enforce prefer-const on special page JS
Change-Id: Ia5d59fb9acb7e9b38696b61ea206ee7764ab9094
2024-10-05 22:19:24 +00:00
Ebrahim Byagowi
f0e228645d Use <bdi> in Language::specialList
And it removes its third parameter as it's unused.

Bug: T375975
Change-Id: I261b7409817f84967ac66993e5aeaa8ff6323f8e
2024-10-05 21:10:56 +03:30
jenkins-bot
581ecc235c Merge "Use getContentLanguage() in two special pages instead of injection" 2024-10-05 17:40:23 +00:00
jenkins-bot
b2c04d154c Merge "Wrap category links around <bdi>" 2024-10-05 17:32:30 +00:00
jenkins-bot
74e62caff5 Merge "Use Html::element to print <th> elements in Special:TrackingCategories" 2024-10-05 17:31:26 +00:00
Ebrahim Byagowi
b7ce4a4341 Use getContentLanguage() in two special pages instead of injection
Change-Id: I24aab0ee13353bb29eb5fbb3d68ebc9389d5321f
2024-10-05 20:08:43 +03:30
jenkins-bot
c09ac42243 Merge "build: Use inline ignore for MediaWiki.Usage.DeprecatedGlobalVariables" 2024-10-05 15:59:19 +00:00
Ebrahim Byagowi
1a2d495add Wrap category links around <bdi>
As a part of removal of getDirMark use from CategoryTree extension.

Bug: T375975
Change-Id: I2ee6d8fb9161a5434eacad819c6d7784aee8aac3
2024-10-05 19:17:28 +03:30
Ebrahim Byagowi
ca7c62cea0 Use Html::element to print <th> elements in Special:TrackingCategories
Change-Id: I099adbd535a603a8d764a73a72459e7f996b0fd5
2024-10-05 19:11:33 +03:30
jenkins-bot
fa97ff3f9d Merge "Fix incorrect name for notifications menu in documentation" 2024-10-05 00:22:07 +00:00
C. Scott Ananian
1e2af489ae ParserOutput: ensure all created ParserOutputs have a "start of parse" time set
*Most* implementations of ContentHandler::fillParserOutput() ensure
that the returned ParserOutput has had
ParserOutput::resetParseStartTime() called on it at an appropriate
time -- but not *all*.  This is a belt-and-suspenders fix that ensures
that every code path which creates a ParserOutput has *some* "start
time" defined.  This could be misleading if the parsing is done first
and the parser output is created at the very end of the parse, but in
all the code that I've looked at the ParserOutput is the first thing
created and so this default should be reasonable.

While we're at it, remove the parseStartTime from the serialized form
of the ParserOutput, because it is useless after the object is
unserialized.

Bug: T376433
Change-Id: I3bdf3996401a7d5ac4d8e1e5e6afb7ca410cbe6c
2024-10-04 19:14:37 -04:00
jenkins-bot
6e8d2efe2c Merge "installer: Parse messages for Html::warningBox" 2024-10-04 21:54:39 +00:00
jenkins-bot
00244ebd0d Merge "specials: Catch RevisionAccessException and ignore on Special:Undelete" 2024-10-04 21:20:15 +00:00
Máté Szabó
8661130e02 jobqueue: Mark JobSpecification as newable
Why:

- JobSpecification is the preferred way to enqueue jobs without
  instantiating a full Job subclass instance, and the only way to
  enqueue a job in the context of a foreign wiki.
- As such, it's used by several extensions. However, it's not explicitly
  marked as newable.

What:

- Mark JobSpecification as newable.

Change-Id: I3dca96857c875da1ee6f0f6054a12aa6ec276697
2024-10-04 23:05:59 +02:00
jenkins-bot
c7a209c0d3 Merge "eslint: Manually enforce prefer-const in tests" 2024-10-04 20:41:16 +00:00
jenkins-bot
54fa213546 Merge "eslint: Enforce no-var in tests and autofix" 2024-10-04 20:37:15 +00:00
Yiannis Giannelos
473e8c32bf Provide a prefixed StatsFactory in parsoid config
Change-Id: Ic3fc353b030a292952091813c9847cd697b25444
2024-10-04 18:54:33 +00:00
Yiannis Giannelos
fec9daae4e Use statslib for metrics emitted by HtmlOutputRendererHelper
Bug: T359476
Change-Id: If8bc5a7f7383dcb67dadf1f4c02d1b69d7c8fa53
2024-10-04 14:52:30 -04:00
Máté Szabó
a5049b481f status: Log getMessage()/getWikiText() calls on good Statuses
Why:

- Calling getMessage()/getWikiText() with a good Status is a logic error
  that converts the Status being operated on into a fatal one.
- However, this error is never logged anywhere, which can make it
  difficult to diagnose such cases, as seen in
  I17166e988bf389a5b03d4a74f539f7bec7f5997f.

What:

- Add a warning-level log for the case when getMessage() or
  getWikiText() is invoked with a good Status.

Bug: T374436
Change-Id: I3efae5c4c336156924f1c9b4186fa9142aaed9ca
2024-10-04 18:32:24 +02:00
jenkins-bot
efab066bcf Merge "Improve history merge log comments" 2024-10-04 14:19:11 +00:00