| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prior to this patch, UserSelectQueryBuilder::named was
implemented as an equivalent of `!User::isTemp()`. Unfortunately,
that is not fully correct. An IP address is a non-temporary actor,
but it is not a named actor. Actors must be BOTH non-temporary
AND registered to be considered named.
This patch fixes the bug.
Bug: T382889
Change-Id: Ie24ccaa0c446150f61772ecfbebe186757fdf26e
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has been failing integration tests since 20250101 because all 2024
become 2025.
Bug: T382848
Change-Id: I5aa71bb7644cfb42140d8eaba9f408e762b2937c
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use the legacy parser's ::makeLimitReport() in ParsoidParser to ensure
that a number of template-related statistics are included. Protect
ParsoidParser with a check of $wgEnableParserLimitReporting like the
legacy parser does as well.
Bug: T380758
Change-Id: Ibd812676b55eee619f7dbacc476ba84d1b65d005
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 1e7a520f1f42770f7eaeb4369805b427efa32634.
Reason for revert: Given end-of-year timeline and last train of the year,
it is more feasible to chase down the issues in 2025 and reapply this patch then.
Bug: T381982
Change-Id: I4ed5406a8b3aa9c038544bfac9ea361550b2c72f
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In ApiBlock:
* Add an "id" parameter. If this is given, update the specified block.
* Add a "newblock" parameter. If this is given, always add a new block,
don't check if the target is already blocked.
* If "reblock" is given and the target has more than one block, fail
with an "ambiguous-block" error.
Supporting changes:
* Add BlockUserFactory::newUpdateBlock(), which takes a DatabaseBlock
instead of a target union to act on. The block is passed through to
the BlockUser constructor.
* Rename the first parameter to BlockUser::placeBlock() from $reblock to
$conflictMode, and style it like an enum. Add the CONFLICT_NEW value,
to support the "newblock" API option.
* In DatabaseBlockStore::newFromId(), add $fromPrimary, so that ApiBlock
can pass data to BlockUserFactory with equivalent freshness to the
LHS.
Also:
* In BlockUser, memoize prior blocks loaded from the DB
* Move T287798 autoblock check to the memoized accessor. Just don't
return autoblocks.
* Move "TODO handle failure" comment in BlockUser to the called method.
It really can't fail.
* In DatabaseBlockStore::newFromId(), add an $includeExpired parameter
and default to false although it was previously implicitly true.
Based on a brief review of callers, I think this is beneficial.
Bug: T378147
Change-Id: Iea5b77cb27006b33f3dde61660be5ad2c374a425
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If mediaWikiSetUp() is called but not mediaWikiTearDown(), throw an
exception when the next test is set up. This previously failed for
database tests in ChangedTablesTracker with an unhelpful error message.
Interestingly, there was at least one non-database test that was
throwing errors from tearDown() unconditionally.
Bug: T354387
Change-Id: I9a7b169026f5fb491529b0f8ae7bec582ca485b6
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is the standard in every extension. DB schema changes are not
maintenance scripts, and therefore there's no apparent reason to have
the two things together, besides historical reasons.
Also, put each DB type in a separate directory, which wasn't the case
for MySQL before. For SQLite and Postgres schema changes, we now
follow the convention (used everywhere else, including the
generateSchemaChangeSql script) of having the DB type as the last part
of the path. This lets us generate schema changes for all DB types at
once, and without specifying the full file path.
Most files are just being renamed, the exceptions being to update
references to the old location (sometimes still referencing tables.sql).
Note that the old path is still referenced in the autogenerated comment
of schema changes SQL files. These will be regenerated in another
commit. Instead, the schema files are done now, because they're covered
by DatabaseIntegrationTest that would otherwise fail.
Bug: T382030
Change-Id: I3b4a614366d0bc629523ac40ce97d001f3b6bcf8
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
* The JobQueueDB class is the default method used to queue jobs
in MediaWiki and uses the job table to store queued jobs.
* To insert a job into the queue the class needs to perform writes
to the job table, which is done when a transaction is about to
commit or there is no transaction active.
* Therefore, when a job is inserted to the queue and the job
queue uses the JobQueueDB class, it causes a write either
immediately or soon after the call.
* This means that on GET requests, the write violates the
TransactionProfiler expectations.
* There is nothing that we can do here to avoid the writes on
GET requests, because some code needs to ensure the job is
inserted before sending a response. Therefore, we should
silence the warnings regarding performing writes.
What:
* Wrap calls to get a primary DB and inserting to the primary DB
in a scope which silences the TransactionProfiler warnings
related to using a primary DB connection.
* Create tests for JobQueueDB so that the code being added is
covered by tests.
Bug: T379766
Change-Id: Ibd894ab0b99398429f3d8e9849fc0608f774e6cf
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RevisionRecord::getPage() currently returns a PageIdentity, which may
be a Title or a WikiPage. In the context of an ongoing page deletion,
the state of these objects may change and the page ID may get set to 0.
To provide a reliable stable interface that can be used e.g. in a
deferred update or job, we need to return an immutable value object
instead.
NOTE: this may break callers of getPage() that downcast to Title,
or that rely on the page ID contained in the returned PageIdentity
to be updated dynamically during page creation or deletion.
Bug: T380536
Change-Id: I7440f8f30b05949842903094908232455f6a2239
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
Allow for the `HTMLTagFilter` widget to be customized by passing through
the parameters which should be used for the select input's options.
What:
- Support passing an `isActive` parameter to display all tags (`false`)
or only active tags (`true`)
- Support passing a `useAllTags` parameter to use all on-wiki tags ('`true`)
or only software-defined tags (`false`)
Bug: T378622
Change-Id: I73b5566fd54e416cc01fa53f5463a7dd785f857f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Applied return type hints to improve type safety in Message classes.
Adjusted constructors to specify parameter types for consistency.
Enhanced `newFromJsonArray` in `ScalarParam`, `DataMessageValue`,
and `MessageParam` to clarify deserialization logic.
Key updates:
- Added `: string` return types for `getLangCode`, `getKey`, `dump`.
- Added `: array` return type for `getParams`, `getData`, `toJsonArray`.
- Revised `ScalarParam` JSON parsing to ensure a consistent return.
These adjustments enhance type safety across the Message classes.
Depends-On: Id7cc576693f5f1830e1d261cb13c626c901fb40f
Depends-On: I260e3f526be10f7b11e5c77a1e300590c6fc5b2b
Depends-On: I3c318273856d15407c71cb9b4ab7c23a0debb314
Change-Id: I7e50be91c01b4b70e1d1380651f001e35bd60523
|
|
|
|
|
|
|
|
|
|
|
| |
https://docs.phpunit.de/en/11.4/annotations.html#covers recommends:
> Please note that this annotation requires a fully-qualified class
> name (FQCN). To make this more obvious to the reader, it is
> recommended to use a leading backslash (even if this not required for
> the annotation to work correctly).
Change-Id: I7eb4b997346387e5799fa27a61ab317573124fd0
|
|
|
|
|
|
|
|
|
|
|
|
| |
The '1.44' test data is the current serialization output.
The '1.44_native' test data is the output after
I9e6b924d62ccc3312f5c70989477da1e2f21c86b which uses native PageBundle
serialization. This is to establish forward-compatibility using the
procedure described at
https://www.mediawiki.org/wiki/Manual:Parser_cache/Serialization_compatibility
Change-Id: I8d53ff3e9c600cce16a0fc07f3665a91e5d8036b
|
|
|
|
|
| |
Bug: T374683
Change-Id: Id5072010fae7debe309e59f0479f44fbeb036934
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Makes ManualLogEntry::insert uses the right performer user,
or else the user will not be found because it has been renamed by
themselves.
Checks and localisation messages that blocks self-renames are also
removed because self-rename is now possible with the fix.
Bug: T267477
Change-Id: Ie959e15838f87b1f84b8d90796102c8bd099b76e
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* In 5617115fe22337ba464bd6b253c1d2af941b2adc, the
NamespaceInputWidget class was modified to support filtering
out all namespaces but a specified few.
* The modifications to the ::__construct method incorrectly set
the default for this include list as an empty list, which meant
that by default all namespaces were excluded.
* This commit fixes that to instead make the default null, which
does not apply any filtering.
What:
* Fix NamespaceInputWidget::__construct to correctly set the
default for the 'include' configuration value.
* Add regression tests with this fix.
Bug: T378810
Change-Id: Ie00483641cf058b4522b60a72393a8f1ba4d15a1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Namespace select inputs already support an 'exclude' parameter, ignoring
any namespaces that match ids in that array. For
Special:GlobalContributions, it would be useful to have the opposite -
an array of namespaces to be included, as it only wants to support
filtering on common namespaces.
- Allow an 'include' parameter to be passed through to the namespace
select input
- Support 'include' in Html inputs and OOUI inputs
TODO: Support 'include in Codex inputs (see T378582)
Bug: T378179
Change-Id: I4170beb588292fbec26926ca3afe559c25de9f55
|
|
|
|
|
|
| |
This class and all its methods were deprecated in MW 1.43.
Change-Id: I514714159cb4a07e157e7bf012327e8bff184d7f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add FileBackend::addShellboxInputFile(), allowing Shellbox to read
directly from a FileBackend. Add generic, FS and Swift
implementations.
* Add FileRepo wrapper, which takes a FileRepo virtual URL.
* Add File::addToShellboxCommand(), which allows a File to be used as
input in a Shellbox command.
* Add configuration.
* Extend FileBackend::getFileHttpUrl(), adding method and ipRange
parameters. Unindent existing code.
I was going to add support for PUT requests, but I reverted it due to
the impossibility of supporting FileBackendMultiWrite. I left the method
parameter in getFileHttpUrl().
Bug: T292322
Change-Id: If9487a0c9586065bf044b69ac04cc7a06b6e8856
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I27b9a19ab952ede1267921bd042af0fe1c89e228
|
|\ \
| | |
| | |
| | | |
(begin|commit|rollback)PrimaryChanges()"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Automatically perform the empty-transaction commit logic in methods
like beginPrimaryChanges() and commitPrimaryChanges(). This avoids
the proliferation of callers having to call the same set of methods
one after another for non-obvious reasons. It also discourages code
from making brittle assumptions that might fail for setups where
there is only a primary or the primary has non-zero read load.
Deprecate flushReplicaSnapshots() and remove callers.
Clarify the related method documentation.
Bug: T315664
Change-Id: I255afd22ffcaeac0fad2d4e4a2a0c55c99be7905
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T374136
Change-Id: I995916f53eb9408923456cce8b1f3be391fbf942
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Changes to the use statements and some additions
are done automatically via script
This also updates @covers tag for the namespaced classes
Change-Id: I859ba6d05018c99710b744e2becab432410d3bca
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix two problems that made it difficult to convert between Message
and MessageValue, or to write code that could accept both of them,
as exemplified by the StatusValue class:
* Implement a common interface
* Use the same internal format for message parameters
While these changes should be compatible with most of existing code,
where the authors were courteous enough to simply call methods such
as Message::numParam() and not look inside the values they return,
it is potentially a breaking change for anything that depended on
the formatted params being arrays or accessed their keys.
Example patches: https://gerrit.wikimedia.org/r/q/topic:message-param
Notable changes:
* Message and MessageValue now both implement MessageSpecifier
(only Message implemented it before).
* Message::numParam() and other static methods for encoding params
now return MessageParam objects, instead of special arrays.
Use these MessageParam objects internally in Message.
* Narrow down the return type of MessageSpecifier::getParams() (it
was just `array`, allowing any type in the array). Narrow down the
types for Message::params() and MessageValue::params() to match.
* Deprecate MediaWiki\Message\Converter. As a replacement add
MessageValue::newFromSpecifier(), which is analogous to
Message::newFromSpecifier(), but without weird legacy edge cases.
* Make StatusValue::getMessages() return MessageValues. Remove code
that converted between Message and MessageValue, no longer needed.
* Update many type declarations and comments to use MessageSpecifier
instead of MessageValue, as well as a couple of tests that depended
on implementation details.
Bug: T358779
Change-Id: I625a48a6ecd3fad5c2ed76b23343a0fef91e1b83
|
|\ \ \ \
| |_|_|/
|/| | |
| | | | |
HtmlToContentTransform"
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
HtmlToContentTransform
Bug: T359475
Change-Id: I7d4ca748c106dfd560dae31294decfb2b181e2db
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I86fa7d613aa79e07ce20ea7936becf02f25832ac
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Two easy cases, way more can be done.
Bug: T376565
Change-Id: I3b875c4b6b2c2bdf7171a712898d50e26d86c807
|
|/ / /
| | |
| | |
| | |
| | | |
Bug: T360664
Change-Id: I3363a225e54bb2cae01ba066d432a8b7b21933d2
|
| | |
| | |
| | |
| | |
| | | |
Bug: T353458
Change-Id: If02cc9b1ff78e26c1cf8c91ee4695845eb133829
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Also a few other fixes of PHP class aliases spotted by phan.
Bug: T353458
Change-Id: Ie79d65722c47c24f8f20f1293355cfd3c2e8c2ad
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Functions provided by the HandlerTestTrait and used in other rest tests
Reduce session leaking from global state within the rest test
Bug: T376970
Change-Id: Ie0dc52441c6a6ca408812c5d0cc6d791834780e5
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds tests for the caching fix in
Ie76020dc4fa3545f827e1674051530b479f01f31, but these tests also revealed
that the recursive invocation of the legacy parser to expand magic
variables like {{PAGELANGUAGE}} wasn't using the pageLanguageOverride,
aka ParserOptions::getTargetLanguage().
The page language override is used when parsing new context which
doesn't currently exist in the database and therefore doesn't have a
page language set by its title (which doesn't yet exist).
Bug: T376783
Follows-Up: Ie76020dc4fa3545f827e1674051530b479f01f31
Change-Id: If6fe7cf00be6e78ef46181b17f01138383e95e46
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| | |
Bug: T359476
Change-Id: If8bc5a7f7383dcb67dadf1f4c02d1b69d7c8fa53
|