Commit graph

120781 commits

Author SHA1 Message Date
jenkins-bot
9a50504072 Merge "Temporary account to registered account creation flow (layout fixes)" 2023-12-19 12:09:46 +00:00
Cyndy
0554d5cf82 Temporary account to registered account creation flow (layout fixes)
Bug: T350923
Change-Id: I99934fa26ff34fa59909d8a165bad2b4be7c8631
2023-12-19 12:24:49 +03:00
jenkins-bot
af8f376ff6 Merge "mediawiki.base: replace @chainable with @return type" 2023-12-19 06:25:21 +00:00
jenkins-bot
694566c3fc Merge "Document types in mw.notification.defaults" 2023-12-19 06:25:12 +00:00
Jon Robson
39f601dd16 mediawiki.base: replace @chainable with @return type
Flagged by eslint warning
"Missing JSDoc @return declaration  jsdoc/require-returns"

Follow up to Ia709de48cbc0f00ff832eb4666e6abcffdb6f710

Bug: T352308
Change-Id: If3fde9240f763f4f020b664fe61895fb436ec0cf
2023-12-19 06:02:03 +00:00
Roan Kattouw
e365e22ab7 documentation: Convert mediawiki.api from jsduck to jsdoc
Bug: T352308
Change-Id: Ia9320213e2208bb45a7f162b5b5c385fbed09599
2023-12-19 05:54:50 +00:00
jenkins-bot
3e07889c70 Merge "Inline once-called short private methods to its caller, part 1" 2023-12-19 00:05:45 +00:00
jenkins-bot
f845bb04b6 Merge "ServiceWiring: Replace $wgCommandLineMode checks with MW_ENTRY_POINT" 2023-12-18 23:53:57 +00:00
Amir Sarabadani
a778d3fea7 Inline once-called short private methods to its caller, part 1
This makes the code easier to read to avoid jumps and improves
encapsulation by not allowing the rest of the class having access to the
logic. Of course, if needed then some code can be refactored out again
but for now let's not do YAGNI.

Change-Id: Ic37524e386fc04fd67e33768417ff8425f85b0ca
2023-12-18 23:43:32 +00:00
jenkins-bot
f822594ef3 Merge "RateLimiterTest: Test 'newbie' limits" 2023-12-18 21:39:47 +00:00
jenkins-bot
78a6c30cb5 Merge "Bump wikimedia/parsoid to 0.19.0-a9" 2023-12-18 21:17:39 +00:00
C. Scott Ananian
df1f18cc9d ParserOutput: Temporarily move "merge categories" in ::collectMetadata
Due to a botched signature change on the Parsoid side, in -a8 Parsoid
only accepts `string|int` for ContentMetadataCollector::addCategory()
and in -a9 Parsoid only accept `LinkTarget`.  The ParserOutput in
core, of course, accepts both.  So move the code which merges
categories into the section of ContentMetadataCollector::collectMetadata()
where we know that the CMC we're merging with is really a ParserOutput.

Change-Id: I0715f4fbc870e401e5759dd7c7a3c19077c40a6a
2023-12-18 14:31:19 -05:00
jenkins-bot
132a7955ae Merge "Make two messages not raw HTML" 2023-12-18 18:59:57 +00:00
Bartosz Dziewoński
94bbc1db01 ServiceWiring: Replace $wgCommandLineMode checks with MW_ENTRY_POINT
Bug: T313841
Change-Id: I877e336c34e6b0ef5c04ab2c21e90fb3e1e3ea12
2023-12-18 19:54:59 +01:00
Subramanya Sastry
96e6b6c2c1 Bump wikimedia/parsoid to 0.19.0-a9
Depends-On: I8a0880c081527580ed04599fd28b7d266b08b748
Change-Id: Iea894aa2cee90f4ca5c7688493b0654e4605ce23
2023-12-18 12:51:04 -06:00
jenkins-bot
b839714277 Merge "mediawiki.cookie: Remove unsupported @mixins directive" 2023-12-18 18:45:52 +00:00
Translation updater bot
f564f7a80e Localisation updates from https://translatewiki.net.
Change-Id: Ife14e50258ca2822a1dfa87e3f85bc89f50238c6
2023-12-18 17:49:19 +01:00
jenkins-bot
ad865f5a1b Merge "jsdoc.types.js: document commonly used hooks from mediawiki.page.ready" 2023-12-18 16:39:42 +00:00
jenkins-bot
5e3b940db2 Merge "htmlform: Correct validation for file input field" 2023-12-18 16:25:58 +00:00
lwatson
2017035b0a Documentation: Port mw.user to JSDoc
Bug: T352308
Change-Id: I3b9d3f6409d5a6ea09d3e4aefb773844e99508a4
2023-12-18 10:45:41 -05:00
jenkins-bot
4f434bbfd3 Merge "thumb: Fix "PHP Deprecated: strlen(): Passing null to parameter"" 2023-12-18 14:19:55 +00:00
Ammarpad
d2d7902f4e htmlform: Correct validation for file input field
Bug: T327007
Change-Id: Ibe8a4b2d77b530b9612285e422cbb3eca14d532e
2023-12-18 15:07:19 +01:00
Translation updater bot
0ca751d531 Localisation updates from https://translatewiki.net.
Change-Id: I83738cf464a6141f4491d37bf06fa82aabf6b894
2023-12-18 14:49:12 +01:00
Paladox
a7584dda7a thumb: Fix "PHP Deprecated: strlen(): Passing null to parameter"
Change-Id: I7b31f42c15f9404df865a16936091adc455bb675
2023-12-18 13:03:53 +00:00
jenkins-bot
2d748d3ddb Merge "exception: Widen @covers annotations" 2023-12-18 12:25:13 +00:00
jenkins-bot
bfc0ae7121 Merge "Maintenance: Fix RebuildTextIndex" 2023-12-18 11:14:47 +00:00
Winston Sung
d815fa01d8 Maintenance: Fix RebuildTextIndex
RebuildTextIndex require rev_comment_id in
* CommentStore::getCommentLegacy
* CommentStore::getCommentInternal

Follow-up of commit 049b34b41c
(Change-Id Ifd690dc8f030f86e3567a717eaeb830cb6dc703b).

Bug: T344971
Change-Id: Ie5d6ad4233106ddfa7f230c0f8f72ba43cd7dcac
2023-12-18 11:53:24 +01:00
Translation updater bot
42de39058c Localisation updates from https://translatewiki.net.
Change-Id: I045a26da410c5ec9047abfd6ee7a521e3a839347
2023-12-18 09:27:02 +01:00
Timo Tijhof
bd0564c4b8 exception: Widen @covers annotations
Follows I8bc200d678.

Change-Id: Ief9c39223425ff7f73785efcabd212942d82c0fd
2023-12-17 17:22:13 +00:00
jenkins-bot
9f56031c6c Merge "Add Southeastern Kolami language (nit)" 2023-12-17 08:12:37 +00:00
jenkins-bot
837cda18e3 Merge "Installer: Fix license link" 2023-12-16 16:38:03 +00:00
tacsipacsi
36522de3d6 Document types in mw.notification.defaults
With the migration to JSDoc, the documentation for
`mw.notification.defaults` was no longer visible. Make it visible again
by using `@type` instead of `@property` and document its fields in a
machine-readable form. Put this machine-readable documentation in a
`@typedef` so that it can be referred to from the documentation of
`mw.notification.notify` and `Notification`.

Bug: T352308
Change-Id: If9762d040289cdc57d9153dc1fccba8047986713
2023-12-16 14:44:19 +01:00
jenkins-bot
7bfe2155fc Merge "Update book sources, special page names and linktrail for Norwegian" 2023-12-16 07:37:50 +00:00
jenkins-bot
0d45f127f5 Merge "ParserOutput: keep modules and module styles unique" 2023-12-16 04:25:53 +00:00
Jon Harald Søby
097000d54c Update book sources, special page names and linktrail for Norwegian
Update the book sources (lots of rotten links), add new special
page name translations (and fix a few old ones), and add more
characters used in Norwegian words to the linktrail for
Norwegian Bokmål and Norwegian Nynorsk.

Change-Id: I8dc1cc416ce939887f464c00cc30dff4d6819b63
2023-12-16 04:34:35 +01:00
MusikAnimal
caabc5d111 jsdoc.types.js: document commonly used hooks from mediawiki.page.ready
mediawiki.page.ready is marked as not to be migrated to JSDoc, but it is
where several commonly used hooks are first fired. For now, we document
these in jsdocs.types.js so that other places in JSDoc we can reference
the hook with @fires.

Bug: T352308
Change-Id: I255e1ee96703b31605abcd596b3113e96d684b90
2023-12-15 21:40:57 -05:00
jenkins-bot
11701c34d3 Merge "layering: UploadBase should not depend on API modules." 2023-12-16 01:52:44 +00:00
jenkins-bot
10accfc54d Merge "Deprecate and stop using Database::listViews()" 2023-12-16 01:49:22 +00:00
jenkins-bot
68d9c02115 Merge "Skin: Use EmailUser instead of deprecated methods" 2023-12-16 01:47:10 +00:00
jenkins-bot
1e83812456 Merge "Documentation: Port mw.Uri to JSDoc" 2023-12-16 01:46:06 +00:00
daniel
2cb8d6fbde layering: UploadBase should not depend on API modules.
API modules are high level request handler, lower level code should not
depend on them.

This patch solves the problem only partially, since it leaves references
to ApiUpload in AssembleUploadChunksJob and PublishStashedFileJob. These
jobs were already accessing ApiMain, so while this does not fully resolve
the problem, it reduces it.

Change-Id: I39c9e30cfb2860c573eed8a791f1a292a83cbd76
2023-12-16 01:29:45 +00:00
lwatson
a9f2f2da2d Documentation: Port mw.Uri to JSDoc
Bug: T352308
Change-Id: If780d42c77ac270046ac19a534c758ef2e6f7215
2023-12-15 20:15:46 -05:00
Ammarpad
01ae5de115 Installer: Fix license link
Bug: T353373
Change-Id: If0bc0fa962fb0cc0016d7a4df0a6e7d3db12b19f
2023-12-15 22:45:15 +01:00
jenkins-bot
b6fc2684bf Merge "Use PageConfig::getLinkTarget() in DataAccess" 2023-12-15 21:02:44 +00:00
Roan Kattouw
31729516ef mediawiki.cookie: Remove unsupported @mixins directive
jsdoc doesn't support @mixins; we're handling jQuery plugins differently
there.

Bug: T352308
Follow-Up: I4a27abe6b430fef75506df129f3168dcc4bbd565
Change-Id: Ib133dbf1f4427f004c5799da2dfdbdf38a1a843d
2023-12-15 12:40:46 -08:00
jenkins-bot
5480ad37c8 Merge "Cookie: Document in jsdoc" 2023-12-15 20:30:22 +00:00
Jon Robson
3e25486412 Cookie: Document in jsdoc
Changes:
* Switch from mixed to string|null since cookies always cast
to a string. For example `mw.cookie.set('foo',6)` results in '6'
and `mw.cookie.set('foo',[1,2,3])` results in '1,2,3'.

Bug: T35230
Change-Id: I4a27abe6b430fef75506df129f3168dcc4bbd565
2023-12-15 12:09:09 -08:00
C. Scott Ananian
82da9cf14b Use Remex for DeduplicateStyles transform
The previous implementation was using an ad-hoc regular expression which
was matching inside the data-mw attribute of Parsoid output, eg:

 <sup about="#mwt42" [...] typeof="mw:Extension/ref mw:Error" data-mw="{&quot;name&quot;:&quot;ref&quot;,&quot;attrs&quot;:{&quot;name&quot;:&quot;infobox_stats_ref_rail&quot;},&quot;body&quot;:{&quot;html&quot;:&quot;<style data-mw-deduplicate=\&quot;TemplateStyles:r1133582631\&quot; typeof=\&quot;...">

After substitution, the <link> element inserted contained " instead of
&quot; and so broke out of the attribute.

Instead use a proper HTML tokenizer (via wikimedia/remex-html) so that
we don't allow bogus matches inside attribute values.

To fix up tests:
* Don't deduplicate styles when parsing UX messages (also helps performance)
* Don't deduplicate styles in ContentHandler integration tests
* Don't deduplicate styles by default in parser tests
  (unless explicit option is set)

Depends-On: Id9801a9ff540bd818a32bc6fa35c48a9cff12d3a
Depends-On: I5111f1fdb7140948b82113adbc774af286174ab3
Followup-To: Ic0b17e361bf6eb0e71c498abc17f5f67f82318f8
Change-Id: I32d3d1772243c3819e1e1486351d16871b6e21c4
2023-12-15 17:49:21 +01:00
Amir E. Aharoni
33d5ef6a70 Add Southeastern Kolami language (nit)
Bug: T353500
Change-Id: Idf8bb32620cdbda4daf62694aed0f69550780969
2023-12-15 11:47:13 -05:00
jenkins-bot
5a95e4e702 Merge "HtmlHelper: Add "legacy compatibility" mode" 2023-12-15 16:21:11 +00:00