| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Bug: T353458
Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
|
|
|
|
|
| |
Bug: T353458
Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MediaWikiServices is the only hook where global configuration
settings can be safely changed; document this, and also try
to clarify which services are safe to use.
(The hook container service has already been created at this
point, since that's what is used to run MediaWikiServices
itself; and ConfigFactory does not and cannot have any
dependencies. Everything else should be considered unsafe
unless explicitly documented otherwise.)
Bug: T286515
Bug: T288819
Change-Id: Ic0f34988cc47a06095c7cb39307e8f5602bd53e9
|
|
|
|
|
| |
Bug: T353458
Change-Id: If0137003ab625017d322d57870448a02569668c3
|
|
|
|
|
| |
Bug: T353458
Change-Id: I3ea6b08c5018ba03ba45c5766e1f46e12f6b8597
|
|
|
|
|
| |
Bug: T353458
Change-Id: Id3202c0c4f4a2043bf97b7caee081acab684155c
|
|
|
|
|
| |
Bug: T353458
Change-Id: Ia0f3e22078550be410c4b87faf6aa4eabe6e270d
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The removed tests in LinkerTest were ported (or were previously
ported) to the new CommentFormatter framework in the CommentParserTest
class; some references to the LinkerTest class have been removed since
CommentParserTest is now the canonical location for these.
Cleaned up a bit more from the removed DummyLinker class as well
(I69689b2037269af3320b6203fc44755f93713489).
Followup-To: I69689b2037269af3320b6203fc44755f93713489
Change-Id: Ia743d13c4fe7f4e3e2bd11274895a261adbfd8e2
|
|
|
|
|
|
|
|
|
|
| |
DummyLinker existed for backwards-compatibility with a few hooks that
have since been removed, e.g. 'LinkBegin'. The last hook using it is
'ImageBeforeProduceHTML', and it looks like it can be harmlessly
replaced there with `null` (none of the extensions implementing the
hook use this parameter).
Change-Id: I69689b2037269af3320b6203fc44755f93713489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
- We want to make sure that the top-level redirect fires for temporary
accounts which were created in an edit attempt, but did not yet save
an edit
What:
- In EditPage and ApiEditPage, perform the redirect if there is a saved
temp user as part of the current process, or if the user account is a
temporary one and it has no edits. Note that this means the top-level
redirect would be performed if a temp user creates a first edit on a
non-home wiki:
- logged out user makes a failed attempt on wiki A, temp account is
created
- same user makes a successful edit on wiki A, redirect hook fires
- same user visits wiki B and makes a succesful edit, redirect hook
fires
Note:
- We could consider setting a query parameter like
`createdinrequest=1` to signal to TempUserCreatedRedirect
implementations that the temporary account was created in the current
request, and did not exist earlier. But I am not sure if we have a use
case for needing that, so have left it out of this patch.
Bug: T359405
Change-Id: If4b8c561383f993606c0ba565591871195a1f8c2
|
|
|
|
|
|
|
|
| |
Also type-hint for IReadableDatabase
Depends-On: I15fc617eae8bc18c911525ea382e99e82b40011a
Depends-On: Ib77f8f409b48115684396bf920428adb075c2820
Change-Id: I09d07ba11e8cd6d288c1ed5ddea89b654e24cbb2
|
|
|
|
|
|
|
|
|
|
| |
This return value documentation was added to hooks.txt in May 2006
(f064b66c64) for EditFilter. In December 2007 (0693d79fb6) the
sections were reordered, incorrectly placing this text in the
EditPage::showEditForm:initial section. This error was carried forward
to the present.
Change-Id: I49c01ebfada493a42ef520984e77b4deffd52d34
|
|
|
|
|
|
|
|
| |
Bug: T166010
Co-Authored-By: Daimona Eaytoy <daimona.wiki@gmail.com>
Co-Authored-By: James Forrester <jforrester@wikimedia.org>
Co-Authored-By: Subramanya Sastry <ssastry@wikimedia.org>
Change-Id: I79b4e732c45095eedbaa80afa5eb7479b387ed8a
|
|
|
|
|
| |
Bug: T166010
Change-Id: Ifdb9e6b59f126b47e4143c875c34a207643b7034
|
|
|
|
|
|
|
|
|
|
| |
DummyLinker existed for backwards-compatibility with a few hooks that
have since been removed, e.g. 'LinkBegin'. The last hook using it is
'ImageBeforeProduceHTML', and it looks like it can be harmlessly
replaced there with `null` (none of the extensions implementing the
hook use this parameter). Let's try deprecating it.
Change-Id: I73549afdafd681fc238e825f03bff329a65a3f47
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extracts the MediaWikiEntryPoint base class and ActionEntryPoint
class from the MediaWiki class. MediaWiki itself be deprecated.
The intent is to create other subclasses of MediaWikiEntryPoint for the
use by other entry points such as thumb.php or api.php. This will allow
us to share code between entry points, and make these entry points
testable by moving their implementation into a class.
Bug: T354216
Change-Id: Ib70e4e67e4cb1b65ac218c095864fb6eb43d0929
|
|
|
|
|
|
|
| |
Most used non-namespaced class!
Bug: T353458
Change-Id: I4c2cbb0a808b3881a4d6ca489eee5d8c8ebf26cf
|
|
|
|
|
|
|
| |
The hook is no longer called, so the deprecation warning of the
HookContainer (as mention in DeprecatedHooks) cannot work as expected.
Change-Id: Idb586e9c2d8ba87411acc137537db6d6c75485a7
|
|
|
|
|
|
|
| |
Deprecated since 033e75cb2635 included in MediaWiki 1.40.
Use GetBlockErrorMessageKeyHook instead.
Change-Id: I346c7ec9ed7d57e3d1e1aa9f761d24e87c4ec513
|
|
|
|
|
|
| |
Follows-up 6dacea8ec695887c512b8772bf37f269498a8125.
Change-Id: I352d9c29365ab490f1679afa9e32bf193ea67015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also fix remark about standards. RFC 2616 required an absolute
URL for the Location: header but later versions staring with
RFC 7231 do not, including RFC 9110 [1] which is the version
that made it to Internet Standard status; the WHATWG Fetch
spec [2] also agrees.
Nevertheless, there is no harm in expanding redirect URLs, and
maybe improves interoperability with old clients, so don't
change the logic, just adjust the comment.
[1] https://datatracker.ietf.org/doc/html/rfc9110#name-location
[2] https://fetch.spec.whatwg.org/#concept-response-location-url
Change-Id: Ifcc2e8ae3912fa5f704ede23857e66054b1b49e4
|
|
|
|
|
| |
Bug: T166010
Change-Id: I7257302b485588af31384d4f7fc8e30551f161f1
|
|
|
|
|
|
|
| |
This has been approved as part of RFC T166010
Bug: T321882
Change-Id: I6bbdbbe6ea48cc1f50bc568bb8780fc7c5361a6f
|
|
|
|
|
|
|
|
|
|
| |
And namesapce them:
- StreamFile
- OutputHandler
- OutputPage
Bug: T321882
Change-Id: Iedf8d88c595e580f2d8f0734c92aa5c45618ba33
|
|
|
|
|
|
|
|
|
|
| |
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.
Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
|
|
|
|
|
| |
Bug: T321882
Change-Id: I48c10343295c4eb3d9ef8037343b0070e928f040
|
|
|
|
|
|
|
|
|
|
| |
Common naming convention for hook runner interfaces
The hook is new in 1.40 and the rename should be backported,
but the old name needs alias as it is already used in extensions.
Bug: T334689
Change-Id: I3f9e6d33f1bf29e937c82860fcebd088dde647da
|
|
|
|
|
| |
Bug: T201491
Change-Id: I5c9408c262f09c936525f35abfacfa92a193b791
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
The category type is called 'file', not 'img'/image
Update Linker::link as well
Change-Id: Ic4b8267db006db356468afbf2290fb9a3e62df79
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is moderately messy.
Process was principally:
* xargs rg --files-with-matches '^use Title;' | grep 'php$' | \
xargs -P 1 -n 1 sed -i -z 's/use Title;/use MediaWiki\\Title\\Title;/1'
* rg --files-without-match 'MediaWiki\\Title\\Title;' . | grep 'php$' | \
xargs rg --files-with-matches 'Title\b' | \
xargs -P 1 -n 1 sed -i -z 's/\nuse /\nuse MediaWiki\\Title\\Title;\nuse /1'
* composer fix
Then manual fix-ups for a few files that don't have any use statements.
Bug: T166010
Follows-Up: Ia5d8cb759dc3bc9e9bbe217d0fb109e2f8c4101a
Change-Id: If8fc9d0d95fc1a114021e282a706fc3e7da3524b
|
|
|
|
|
|
|
|
| |
Also moving TemplatesOnThisPageFormatter to the same namesapce as it's
only used by EditPage
Bug: T321882
Change-Id: Ibefc44eb64aedb430148b109090584c3e35794ab
|
|
|
|
|
|
|
| |
This feels like a no-brainer unless I'm missing something obvious
Bug: T321882
Change-Id: Id49c3d0dd6ea4593211048850856b5b8e05a8fb3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Changed the PreferencesGetLayoutHook parameters so that it no longer passes a Skin variable. Now, the hook will pass an additional string variable with the skin name and an associative array with extra skin properties the hook might need.
Bug: T322781
Change-Id: I0c4e76b528d0196ae6929fd8ed71abc6c860dfc4
Depends-On: I200aec586dbe8613e9a9c762db8d9bcbdc69a35b
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The hook was underspecified, $article was passed by reference
but it doesn't make any sense to change it and none of the existing
implementations do, so clarify in the docs that it shouldn't be
done and drop related logic. Also improve documentation in
general.
Bug: T323184
Bug: T323254
Change-Id: I53dfc7e29adcd21bb8b3ca7a1df6d88819099f3c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redoing I5ea70120d74 but without moving WebRequest that caused issues
with phan-taint-plugin.
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequestUpload
Bug: T321882
Change-Id: I832b133aaf61ee9f6190b0227d2f3de99bd1717b
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2bdc0b2b7209441a42a784157633a8a01b321922.
Reason for revert: T166010#8349431
Bug: T166010
Change-Id: Idcd3025647aec99532f5d69b9c1718c531761283
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving:
- DerivativeRequest
- FauxRequest
- FauxRequestUpload
- PathRouter
- WebRequest
- WebRequestUpload
Bug: T166010
Change-Id: I5ea70120d745f2876ae31d039f3f8a51e49e9ad8
|
|
|
|
| |
Change-Id: I8f6ec421de5bde86e7f7a830069c3dc2c05ba0b7
|
|\ |
|
| |
| |
| |
| |
| | |
Bug: T317201
Change-Id: I1c20e7e62e0f2b453735689e3dc543164b5fd067
|
|/
|
|
|
|
|
| |
Added icons to Special:Preferences' mobile layout sections. Also added a hook so extensions can add their own icons.
Bug: T317419
Change-Id: I6d5730d47e7595b1705787995fe5db2fe734d7f5
|
|
|
|
|
|
|
|
|
|
| |
- Added a hook that checks if the preferences should have a mobile or desktop layout
- Added descriptions to preference tabs, which now display as a stack layout in mobile
- Added a new mobile JS file to control Special:Preferences when in mobile view
- Built the mobile interface in the preferences form
Bug: T311717
Change-Id: I468481b66bf96880d1779cd11a46e18745e2c894
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a hook "TempUserCreatedRedirect" which allows an extension to modify
the post-save redirect after a temporary user is created. CentralAuth
will handle this hook in order to redirect to loginwiki. Loginwiki will
redirect back to the page being saved.
In LoginHelper::showReturnToPage add an "anchor" parameter to specify
the URL fragment to redirect to. This is intended for section editing
with a redirect via loginwiki.
In AuthManager::autoCreateUser(), just allow any valid username, don't
require it to be creatable. Previously a non-creatable username was
allowed only with $source=AUTOCREATE_SOURCE_TEMP, but CentralAuth
depends on user autocreation from the session during refreshCookies. The
session is already validated at this point, so it's not like a user can
exploit this to create arbitrary names.
Change-Id: I623330dbf5d0573c93ae22f962618d6ddbd126d9
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The functions returning null or the class property is set explict null.
Some function should not accept null or return null.
Found by phan strict checks
Change-Id: Ie50f23249282cdb18caa332f562a3945a58d86ff
|
| |
| |
| |
| |
| |
| | |
Found by phan strict checks
Change-Id: If41d16b473baddd92cc4261cdc2bfbe65fedcb19
|
|/
|
|
| |
Change-Id: I301786f35cd6eb9c63fb72e0b64cffa9efd7b86b
|