| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, BlockErrorFormatter would only generate a human-readable
error message for permission errors caused by blocks, and
PermissionManager would build a PermissionStatus object out of them.
Machine-readable block info was added later: UserAuthority would add
a Block object to each one, then finally each API module (via
ApiBlockInfoTrait) would generate block info from these Block objects.
Now all of this happens in BlockErrorFormatter and PermissionManager.
For compatibility with older code, remove the extra information when
using the deprecated PermissionManager::getPermissionErrors() method.
This is a small hack that can be removed together with that method in
the future.
The changes seem to make a workaround for T357063 in ApiQueryInfo
unnecessary (tests added in c55d33ef11 still pass).
Bug: T357063
Change-Id: Id121d51a24fbb1d8210e60bdd54c61b16938dd70
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Main change:
* Add a class hierarchy representing block targets, representing a
target and type.
* Add BlockTargetFactory, replacing BlockUtils.
* Add CrossWikiBlockTargetFactory, replacing BlockUtilsFactory.
* Construct a BlockTarget object early in the request flow and pass it
down through the layers, instead of having every layer interpret
UserIdentity|string target specifications.
Also:
* Remove Block::TYPE_ID. Nothing uses it in code search, so there's
no point in porting it to the new system.
* Stop using the type constants as specificity scores. Add
BlockTarget::getSpecificity().
* Add DatabaseBlockStore::newUnsaved() to replace direct construction of
DatabaseBlock in insertBlock() callers. There are many such callers in
tests. This is part of the effort to remove the service container
usage in DatabaseBlock::__construct().
* Make DatabaseBlock::getRangeStart() and getRangeEnd() return null if
the block is not a range, since that is convenient for their only
caller following the resolution of T51504.
* Add DatabaseBlock::getIpHex() which similarly maps to a DB field in
the new schema.
* In ApiBlock and ApiUnblock, have ParamValidator provide UserIdentity
objects instead of converting to a string and back to a UserIdentity
again.
Bug: T382106
Change-Id: I2ce1a82f3fbb3cf18aa2d17986d46dbdcc70c761
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- $wgHooks should work like a regular configuration variable which
cannot be modified after bootstrap.
- FauxGlobalHooksArray was in place to trigger deprecation warnings for
write access to $wgHooks since 1.40.
What:
- Remove FauxGlobalHooksArray and supporting code
Bug: T331602
Change-Id: I8d881857850a906b893cf3066dcfbe277f9b0b14
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Create a provider pattern for sending notifications (T383992).
There is no base notifications handler in core; they can only
be provided by extensions.
A handler in the Echo extension, compatible with the existing
Echo notifications system, will be implemented in T383993.
Co-Authored-By: Piotr Miazga <pmiazga@wikimedia.org>
Bug: T383992
Change-Id: I16b309935c3d29c3cde4459b5e36abce063a8534
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- The TSP team would like to render user links for expired temporary
accounts differently.
- User links are currently rendered by Linker::userLink(), which is in
need of some refactoring as documented in T308000 and elsewhere.
- We should take this opportunity to clean up relevant code before
implementing our temporary account-related changes on top.
What:
- Introduce a new UserLinkRenderer class and service, and move the
functionality of Linker::userLink() to this class.
- Soft-deprecate Linker::userLink() and have it delegate to the new
service.
- Move and expand related test cases.
Bug: T358469
Bug: T308000
Change-Id: I974c4d92c5281067d53bb3bdc94eb0e290b7cadb
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
No longer used. see T343492
Bug: T379661
Change-Id: I6b3d51995452f77b5da86b0cf32a23b12c7c669c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RenameUserJob is moved to Job/RenameUserTableJob because there are two kinds of jobs now.
The newly added RenameUserDerivedJob is used for performing user-renames across
a wiki family using virtual domains or shared tables. Most code are
moved from SpecialRenameUser and maintenance/renameUser.
The new service, RenameUserFactory is added for constructing RenameUser
easier.
When a global rename happen, the central wiki will enqueue
RenameUserDerivedJobs for other wikis in the same family.
The derived jobs will check if the central wiki has the same user table
as local, and perform updates to local tables.
A new user-right 'renameuser-global' is also added because wiki families may
want global users to be renamed only by a limit set of users or
on a certain global wiki.
Bug: T104830
Change-Id: Ic4120cbd9a4850dfe22d009daa171199fe7c5e39
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The previous hook relies on the deprecated method
PermissionStatus::toLegacyErrorArray() to function.
Introduce a new hook which is the same, except it passes
the status object directly instead of the legacy array.
Change-Id: If0aa2ca37a8408d7496dd4ba4c95ed2423438eec
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This moves the following update logic out of
DerivedPageDataUpdater::doUpdates into listeners for the PageUpdated event:
- ResourceLoader: WikiModule::invalidateModuleCache to
ResourceLoaderEventIngress.
- TalkPageNotifications: TalkPageNotificationManager::setUserHasNewMessages
to UserNotificationEventIngress.
Bug: T378936
Change-Id: I5f2083b09d90cbd20abe2e8143a000dfc4d02aae
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T382910
Change-Id: I717e0b45b840ddedb67f402e7b62b46a9b628d85
|
| |/ /
|/| |
| | |
| | |
| | | |
Bug: T332467
Change-Id: Id4cde6acefc94ee5bf6e634772b0cfdfaded33e4
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | | |
Bug: T368740
Change-Id: I1b9435dcdacd952b2bc703b3d5f7083406ebbed6
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This introduces the concept of a "cause" and "performer" into
PageUpdatedEvent. Causes are e.g. "edit" or "import" or "move".
The performer is the same as the author for edits, but not
necessarily for undeletions, moves, etc.
Note that cause and performer were already being tracked in
DerivedPageDataUpdater for logging purposes.
PageUpdatedEvent was modeling the cause using flags.
This change formalizes the concept of "cause" and "performer"
and ensures it is handled consistently.
As an aside, this simplifies some test cases in
DerivedPageDataUpdaterTest to avoid confused state.
Bug: T383031
Bug: T383095
Change-Id: I79bde5604790636c91848f265fffd81d6348a8b4
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Shows a warning when trying to create a redirect that points to another
redirect.
Bug: T326056
Change-Id: Ieb51dde88ce6c23753f74191a85cd40f0bfbd864
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Why:
- It's useful to be able to listen to sets of compatible event types.
What:
- Make DomainEvents aware of a list of types they are compatible with.
- Make EventDispatchEngine dispatch to all compatible listeners,
registered for any of the supported types.
- Move all page events to their own namespace
Bug: T384330
Change-Id: I96bde2cfaf198e409a6ef3a24101ee7d02d57959
|
|/ / /
| | |
| | |
| | |
| | | |
Bug: T383492
Change-Id: Iabcb8ccb89697d531b291cc1fcddbfb2e205d741
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a REST API hook that allows disabling specific endpoints
or rejecting specific requests, similar to ApiCheckCanExecuteHook.
Bug: T383011
Change-Id: I8518cb1ad7f00594c9f31d7bf934b1ce74f18da9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Defines a DEFAULT_SPLIT_GROUP_COUNT of 8, matching current behavior.
Allows this to be overridden with an environment variable,
QUIBBLE_PHPUNIT_PARALLEL_GROUP_COUNT.
Value must be an integer greater than 2. Throws
InvalidSplitGroupCountException for invalid counts.
This is handled in a static getSplitGroupCount(), since it needs to be
available from the static launchTests().
I tested this in mediawiki-docker by running something like:
$ composer phpunit:prepare-parallel:default
$ composer phpunit:prepare-parallel:split-file tests-list-default.xml
Then to check the default value:
$ composer phpunit:parallel:databaseless
To check a non-default value:
$ QUIBBLE_PHPUNIT_PARALLEL_GROUP_COUNT=4 composer phpunit:parallel:databaseless
To check for an exception on an invalid value:
$ QUIBBLE_PHPUNIT_PARALLEL_GROUP_COUNT=foo composer phpunit:parallel:databaseless
I'm not sure it _works_, but it doesn't blow up.
Bug: T383254
Bug: T383389
Change-Id: I20dd9663ac0dccd974ae84b2b89d13a3f2842f9c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
* A hook is needed by the CheckUser extension that allows it to
add a CSS class to any log line displayed in
Special:RecentChanges or other HTML RC feed, where the class
is added only if specific conditions about the log are met
(e.g. performer is a temporary account).
* No other hook exists which is both specific to log entries in
RC feeds and also allows modifying the CSS classes that
wrap the specific log entry (as opposed to a group of log
entries).
* Therefore, a new hook is needed that allows this modification.
What:
* Call the new ChangesListInsertLogEntry hook in ChangesList
::insertLogEntry which is used to generate the
HTML for a log entry in an RC feed.
* Add the ChangesListInsertLogEntryHook interface, and implement
it in HookRunner.php
* Add tests for ChangesListTest to cover the code that was
previously untested and also modified in this commit. This also
checks that the hook works as expected.
Bug: T370083
Change-Id: I7d907823d9f15d518c55494f28950441a98f6f86
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also condition using incoming span context upon
$wgAllowExternalReqID
Bug: T340552
Change-Id: Ib1cf361dd800c81a7943231441d58c790191ef5a
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This class was namespaced in commit 72338de32b, but its location
did not match what you'd expect based on its namespace.
For consistency and to ease discovery, move it into the flat
`objectcache/` directory.
Bug: T364652
Bug: T353529
Change-Id: I3d77cb22560eeec7d77a2a818583527efd2176ce
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There is no reason for code outside the BagOStuff component to use
this class. It is used solely for encoding, detecting, and decoding
internal value wrappers. Any value passed to or returned by BagOStuff
methods does not involve this class.
Between MW 1.34 and 1.43 this class had more public methods, which
have since been removed.
As an internal class, move this freely into the flat list of
objectcache/ classes.
Bug: T353529
Bug: T364652
Change-Id: I22178bdaf6c9762a32e7428d3a286583ca99bfcf
|
|\| | |
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* The LightweightObjectStore namespace was experimentally adopted for
two classes in 2020 with change Ia862c5111a3daf10a34fc78163301629,
however in 2024 when we namespaced the BagOStuff component as a
whole, we went with ObjectCache namespace in change Ie01962517e.
* The StorageAwareness class is internal since I836735b1fec8dfd, so
it can be freely renamed.
* Similar to I836735b1fec8dfd, further reduce direct use of it,
keeping it only as effectively an internal trait for adding a
consistent set of constants to 3 classes (Bag, Wan, MemcClient).
Bug: T353529
Bug: T364652
Change-Id: Ib10db39a91274e84a51a2eead94560b8d9137019
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | | |
Bug: T364652
Change-Id: I778a164d8eb2da9707ba4e3e1c7075bd627c0985
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Why:
- MimeAnalyzer needs ZipDirectoryReader, but it was not part of libs.
This was a problem because libs code must note depend on MediaWiki code.
Since there seem to be no other users of ZipDirectoryReader, the
simplest solution seems to be to move ZipDirectoryReader into the
Wikimedia\Mime library.
What:
- Moved ZipDirectoryReader and ZipDirectoryReaderError into
the Wikimedia\Mime namespace under includes/libs/mime.
Bug: T382910
Bug: T364652
Change-Id: Iccdade8dcd3211b7e2df2e50694da8d97c82b59e
|
|/
|
|
|
|
|
| |
The hook is deprecated since I8ea56f2d111aeccee158c40b8379383e92154d8a
included in MediaWiki 1.43.
Change-Id: Icdf724fa2eeab10d4895fa1d45d7ff7320626c4e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Created a new input widget and used it for the dropdown mode of
HtmlMultiSelectField. Dropped the `mw-htmlform-dropdown` class
to avoid being affected by old site/user js/css targeting it.
Also, generalised the creation of no-js fallback implementation,
so subclass of TagMultiselectWidget can provide a friendly
interface suited for their options' data.
Bug: T380995
Change-Id: Ieeb02ad875c6932cf594de6585cdda79771f7e50
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SchemaMaintenance contains non-trivial logic to generate a standard SQL
comment, and to reformat the autogenerated SQL. Being inside a
Maintenance class, it is unpleasant to test because of all the
dependencies on CLI arguments etc.
So, extract a new SchemaGenerator class that is responsible for
validating a JSON file, and autogenerating a canonical .sql file from
it. This belongs to the maintenance realm (as opposed to the DBMS lib)
due to specific assumptions around formatting, as well as the script
name and instructions in the comment.
Errors are passed around using the existing
AbstractSchemaValidationError, so we don't have to rely on
Maintenance::fatalError.
As part of the refactoring, update the JSON path canonicalisation done
before outputting the SQL comment, so that the path is always relative
to the extension or core, regardless of where the script is run, to
ensure consistency and make it easier to test.
Adjust tests, duplicating some test cases as needed.
Bug: T381981
Change-Id: I358cc24798f518d7c3dc03c60bcc0702af252fee
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why:
* Temporary user names contain a generated part. The method for
generating this part is configurable, and uses different
implementations of SerialMapping.
* The PlainNumericSerialMapping is used by default, but can be
difficut to read if the number that is generated is long.
What:
* Add ReadableNumericSerialMapping, similar to the plain numeric
mapping, but with hyphens after every group of 5 digits, for
readability.
* Make ReadableNumericSerialMapping the default in the config
$wgAutoCreateTempUser['serialMapping']['type'].
Bug: T381845
Change-Id: I262f1de38370c9e228f2fe804e95d9d43c49ca86
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Merge Interwiki extension into core, with some changes:
* Always register 'interwiki' user right and 'interwiki' log type, and
remove $wgInterwikiViewOnly
* Remove nonstandard 'intro' and 'body' CSS classes on Special:Interwiki
* Make interlanguage special cases be conditional on $wgInterwikiMagic
* Other cleanups
* Add SpecialInterwikiTest
* Add a constant MW_HAS_SPECIAL_INTERWIKI which can be used in config to
suppress loading of the extension.
After merging Interwiki extension into core we can remove
InterwikiLoadPrefix hook, which is incompatible with Parsoid.
Bug: T33951
Bug: T270444
Bug: T312425
Bug: T315759
Bug: T357247
Depends-On: I0d02d93f49c746a7ce86b72b456f13c4af9b6c34
Change-Id: I05049e7c2e056928977245367583d027b80ef613
|
|\ \
| |/
|/| |
|