This passes the option to ApiParse which will ensure that it uses
the ArticleParserOptions hook so that the parser options used after
reload match the ones originally used to render the article.
Bug: T373212
Depends-On: I906affc8d2335b7bb48dff3a4b061fcf86b71cee
Change-Id: I18147254f1ac5f08a57e85eb2f031df7701dccef
HtmlOutputRendererHelper::init() and HtmlInputTransformHelper::init()
have been deprecated.
This is a replay of Id63d93db801d0bfb3fdb4c69bf7dfeea4e68ea8f and
I8b5cd59f839446709ffd0ce1b78c1bba40195ae0, which got merged prematurely
before their Depends-On was merged.
Depends-On: I1e1213597c6be012f2bc024c2b370c968ff3b472
Change-Id: Ie762dc34523eed79bc537143394b04e64f004b53
Revert submission 1039794-split-render-id
Reason for revert: Depends-On has not been merged yet so this
is causing CI issues.
Reverted changes: /r/q/submissionid:1039794-split-render-id
Change-Id: Iac6316cf7010b5ea92672e9ad6f09e8ee57e066b
Revert submission 1039794-split-render-id
Reason for revert: Depends-On has not been merged yet so this
is causing CI issues.
Reverted changes: /r/q/submissionid:1039794-split-render-id
Change-Id: Ifcb43e8e3dd845c146498562b398affe2936593f
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Ia08d43b3973a12b8e0628c8552bee1c4b702f249
Most of this code was already typed, but not everything. Using
language-level type declarations allows us to remove extra PHPDoc
blocks that just repeat the same information.
I'm also using the more narrow UserIdentity instead of User in a
few places where this is possible.
Change-Id: I7661824fcb34180af1a4fd3030fcd6c0b7d34089
The content type check gets lost by refactor of the condition in
3458d8a27e for veaction=edit.
That seems wrong as the comment says only with supported content model
Follow-Up: Ie174bc3f16bceb29cb155b9223e0acef70167fd6
Change-Id: I088f358efaa0a00a2bacbf371c80607231c79eb7
Pass renderId and revisionId as part of the (fake) body to
HtmlInputTransformHelper::init, instead of calling setOriginal()
directly. This avoids mis-counting these requests as not providing a
renderid in statsd.
Change-Id: I929812e571d8bd5df1c833586f3ae35d43af63cf
Avoids requiring a dependency on the BetaFeatures extension.
Tell the phan config to include the BetaFeatures checkout so it'll pass
on that file, though. (Same as DiscussionTools.)
Change-Id: I258d3be59ea9cf0a798d93f0f8b1fd18a455d45a
HtmlOutputRendererHelper will throw HttpErrors when parsoid reports an
error. We catch these in ApiParsoidTrait, and convert them to action API
error responses. When doing so, we should preserve the additional error
data included in the HttpError.
Bug: T356157
Change-Id: I8c89468c59314069025537e6807ccbc46dbe13c6
This doesn't make much of a difference, but I think it is more
correct. False is returned when the key cannot be found in the
cache. This is an expected situation here (hence the "try"). Null
can only be returned when null was stored in the cache before. This
can't happen here, as far as I understand the code.
Change-Id: I82f24e9f7234d0ec79f8223cd29e3df6e83f7f7b
The enrollment happens in ArticleTargetLoader so that the bucket will be
set for init logging.
Bug: T342930
Depends-On: I9c7c0fb52a6ec68609df6b518c7d35ddd98a95bf
Change-Id: I03c8dc8beb2eb267c052b856a30343ecab3a7657
The HookRunner class is a lightweight class and not designed to be a
service, the needed HookContainer should be injected instead and a hook
runner created when needed.
The overhead from the service wiring is the same as using new objects
when needed.
This follows practice from core and the documentation in
core/docs/Hooks.md in the section "Hook runner classes"
Change-Id: Ib42281dfae8a5a260005d82ed3bb7da12e1b645e
This message is treated as text, and the entire result is escaped
later. rawParams() has no effect except for avoiding parsing wikitext,
so use plaintextParams() instead.
Change-Id: Ifa1f1b51546d4c24b8789b6264302a3ced81cd52
Ib70e4e67e4cb1b65ac218c095864fb6eb43d0929
changed the type of the last parameter of
BeforeInitializeHook::onBeforeInitialize
Bug: T354216
Change-Id: Icd9e2a70fe001aa706b4059236b93db2eeb79369
Despite outwardly behaving just like a Message, in fact MessageValue
stores its parameters in an incompatible way.
Bug: T352012
Change-Id: I16c64cdc8c2795536579c52a0aa21832900d96b6
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Ifb380012959b5b2853586cd25b0d003b53dc38eb
We diff only on provided wikitext. This was causing inaccurate diffs on
pages with slotted content (e.g. File: pages on commons), which would
claim the edit would delete all the slot contents other than the
wikitext in main.
Also, remove the very old backwards compatibility params that were being
passed to getResultData in this method.
Bug: T351235
Change-Id: I135082162b96503e8d896aa4014abc9f4b936580
Since Parsoid now treats DEFAULTSORT like any other template, we have to
scan mw:Transclusion spans.
Bug: T337398
Change-Id: Icba92fc14c1c56ec4711ba49407e8be368d57842