| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Follow-Up: I2ce1a82f3fbb3cf18aa2d17986d46dbdcc70c761
Bug: T387121
Change-Id: I1011934ae539077ac9f8551ee0a0df061927219c
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- When introducing saveDummyRevision() in I1f8c0ac68b, we didn't account
for the fact that most (but not all) dummy revisions should be marked
as minor edits.
What:
- Add a $flag parameter to saveDummyRevision()
Bug: T198297
Bug: T387067
Change-Id: I1db3ccc816cdb0e2a93593625306a9080b7204eb
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The id of blocker was not properly given to formatter. It resulted in treating registered admin userlink as anonymous user.
Change-Id: I9dddb59f430385ad4b24ff009e8cbea2768db0ea
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Autoblocks `unblock` or `remove block` links should always point to
Special:Unblock
Bug: T386876
Change-Id: Iad2f66b8829735ed4e99e663b5554664d4da875f
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use dependency injection for services,
instead of global state via MediaWikiServices::getInstance()
Follow-Up: I802ad15e1ef5d90e12686f1cf636db27973986f5
Change-Id: If52c17418efa269f364a33451d30945352a59df8
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use dependency injection for services,
instead of global state via MediaWikiServices::getInstance()
Follow-Up: Icb9265644bdbc0b30e2a419ae0103f0e78fe90bd
Change-Id: If2d2303e63e5496cab4a57e431e524fdf7052857
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The queries in this pager can be cleaned up massively on the read new
mode. The same goes for the code which currently does two queries and
then combines the results (and reorders them). Once we can get rid of
the old code, this will allow for removal of hundreds of lines of code.
Bug: T383496
Change-Id: I2427c845b427658788765646df5ad7d4fd7b91ed
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
MessageCache has enough to do without also being a parser. Split a
MessageParser class out of MessageCache and make it a service.
* MessageCache::parseWithPostprocessing() becomes MessageParser::parse()
because every caller wants postprocessing so it makes sense to use the
shorter name for this.
* MessageCache::parse() becomes MessageParser
::parseWithoutPostprocessing(). I changed the return type from
ParserOutput|string to ParserOutput, which is a followup to
I8a1fa84e650d920d07d74722d8059d5afeedec6b. Narrowing the return type
does not break b/c so it is possible to make this change for both
variants.
* In the new methods, a null title is always a convenience alias for a
placeholder title (Special:Badtitle). This reflects the convention in
Parser::setPage(). The old MessageCache::parse() retains its b/c
fallback to $wgTitle. MessageCache::transform() had the potential to
fall back to the title used in the previous call, a fragile mechanism
which I removed without deprecation.
* For consistency, allow a string language in all new methods.
* In EmailNotification, clean up an early attempt at global state
avoidance.
Change-Id: I05ab21508d5f8394189fd41ac6a2254ac0e0d785
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The doc block is identical to the type declaration for each argument.
Change-Id: I8281b94351fe2be30344f1425a60f31fbf205100
|
|\| | | |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Iff96024f9b261fff2af4205ee7ac568ce53f84a1
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In UserLookup, check against the existing list=allusers query to
validate the target instead of firing a separate API request to
list=users. For targets supplied by URL param, pass in blockTargetExists
and set that on the store's targetExists prop.
Validation within UserLookup is now confined to the single validate()
method.
Remove the blur listener which conflicts with the above strategy (i.e.
validate() could get called before the list=allusers query runs). The
blur listener shouldn't be needed, anyway.
This patch also moves the 'nosuchusershort' error to be on the
UserLookup field itself, instead of atop the whole form – something
Design and Product had requested from the beginning.
Finally, update module styles to reflect recent styling changes (such as
T383921) to reduce flashes of unstyled content.
Bug: T380970
Bug: T384712
Change-Id: I8172a13ffb26080b872bbf4b1a5a4f823acf9380
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- Improve consistency, naming, documentation and definition of flags.
What:
- remove direct access to flags, provide a separate getter for each flag
instead.
- Deprecate EDIT_SUPPRESS_RC in favor of EDIT_SILENT
- Introduce EDIT_IMPLICIT to replace "automated" mode
- Introduce FLAG_RECONCILIATION_REQUEST into PageEvent.
- Introduce isReconciliationRequest into DomainEvent.
Bug: T383552
Change-Id: I2bffbb5810376829f871e1840ca799a8d8232dda
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Bug: T383496
Change-Id: I44daa1293a76659b151df77541291a627ccde955
|
|\| | | |
|
| |/ /
| | |
| | |
| | |
| | | |
Bug: T383496
Change-Id: I0e1e30cc7281666b9036c2f2f96792d6a8a01820
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The doc comment of newBlockPermissionChecker() describes the $target
parameter as being optional. The returned object does not need or use a
target when checkBasePermissions() or checkEmailPermissions() are
called. But failing to pass a target when calling
checkBlockPermissions() is incorrect. This was the subject of the
linked bug. If an admin is performing a block, self-unblock permissions
need to be checked, this is not optional.
This could be enforced at runtime, but it seems safer and simpler to
enforce it statically.
So, move $target from being a constructor parameter to being a formal
parameter of checkBlockPermissions(). This formal parameter will be
statically required after a deprecation period.
Deprecate newBlockPermissionChecker() and introduce newChecker(), using
a name with a slightly less than conventional verbosity to allow us to
change the parameter order. There is no $target parameter to
newChecker().
Backwards compatibility is supported by adding an internal mutator
method setTarget(). This can easily be removed after the deprecation
period is over.
In Special:Block, checkBlockPermissions() was called with $target=null
on form entry, meaning that the user could unblock themselves if the
target was specified in the URL, but could not unblock themselves by
searching with the form. This seems inconsistent. So allow blocked
admins to see the search form, but show an error when they try to block
or unblock someone other than themselves.
Bug: T384716
Change-Id: I8c26cdcc9b87b74bc458fe731cf7f170a2607150
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Creating dummy revisions was a fiddly multi-stage process.
PageUpdater should just offer a method for doing it.
Change how we create dummy revisions in:
* LocalFile
* MovePage
* ImportReporter
Bug: T198297
Bug: T384691
Change-Id: I4c7595ce24337ab637a4e0fdbb313fc77d452a15
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Why:
- Special:Import currently catches every subclass of Exception thrown by
the import process and tries to render an error box for them.
- DBError subclasses, aren't meant to be caught by most code however.
If they left the main transaction round in an inconsistent state,
further errors will occur if the default exception handler hasn't
had a chance to perform cleanup.
- Likewise, exceptions from wikimedia/request-timeout should also be
allowed to bubble up as they indicate that a request-level timeout
(enforced by Excimer in WMF prod) has expired and the request is to
terminate as soon as possible.
What:
- Let DBErrors and TimeoutExceptions bubble up on Special:Import.
Bug: T383933
Change-Id: Iae29d13534bd198823b4d8de0e8db20f43a97038
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer support
Change-Id: I9ef131032a662a3b8db69aa7079dbd51f88f575a
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Using a batch for formatting can reduce lookups for generating links
Bug: T379688
Change-Id: Ia02de55254d0b222ecec8df1bff82ad58a18fedd
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use modern php syntax to call a callable.
Reduce the stack trace to improve performance
and better IDE and static analyzer
Also replace func_get_args with variables
Change-Id: Ie193c4e996ab136e08f1e16c988448d054520aa7
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
SpecialRandomInCategory
Bug: T385890
Change-Id: Id787980d56b71ce15d6e4f7ce7e919e8adbc47fe
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: T383496
Change-Id: Ifddfc42e28529d9a349ac7f4b24bf637aff3b51f
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Bug: T384678
Change-Id: Ifb048489d24cda51ff62b64c0ff21b87eaec2580
Follows-up: I20a3fe8484424427de5dcc55098a09114fedaf66
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
On Special:BlockList autoblock rows:
* Remove the change link, since it is not possible to change autoblocks
* Use wpTarget instead of a subpage to transmit the hash-prefixed ID to
Special:Block, since "#" is not a valid title character.
Special:Block is broken in multiple ways when it receives such a target,
but that can be dealt with separately.
Add test.
Fix static cache which leaked data between tests.
Bug: T385765
Change-Id: I638d6d6d23f9624ba1dff0f4fcc31e7261b70527
|
|\ \ \ \ \ |
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add $string === false or $string === null where $string can have other
types than a string.
Also document null as possible return value in FileRepo.
Change-Id: Iaa29ba01c3fd6bea506debdc6f929edfe881c808
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When linking to transclusions on redirect pages, mark those links as
&redirect=no as well.
Bug: T379863
Change-Id: I526065609ce225aded1f92dbf68935552912fd6e
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When a user enters an interwiki link (e.g. :pl:Jakub Ćwiek) in Special:Search, the existing code showed a confusing “page does not exist” message. This change introduces a new message key ("searchmenu-new-external") and checks $title->isExternal() to display a clearer prompt, suggesting users visit the external page.
Bug: T196392
Change-Id: I84bc35dcab7e947cac1bd34b342bf969fd6cadd2
|
| |/ / /
|/| | |
| | | |
| | | | |
Change-Id: I0f8a8cac36015bba52aea3ee2affd92f83d3574a
|