This change requires MediaWiki 1.32 which is already required in
extension.json.
Change-Id: I61856796d864c9493c1a7a875cb2415f11f081a9
Depends-On: I193f5b9a95430b0a05573c361715e053e5411e32
The special page is only a MessageLocalizer, not a IContextSource.
Its implements all methods of IContextSource, but are delegated to the
underlayed IContextSource. So pass it directly make phan happy, while
the current code works as expected
Change-Id: Ia9d83f2f71a466a2ba74540f96f165c96fb7ca00
This cache was only used so that, if we're told to clear the newtalk
flag and we already know there are no edit-user-talk notifications, we
won't try to delete them. But that's not a good justification for such a
confusingly-written cache that would have been hard to convert to
getWithSetCallback(), and I'm concerned that using cached data to make
this decision could lead to inconsistencies.
Also remove the notifCountHasReachedMax() check, which made no sense: if
the user has >99 notifications, that is no justification for not marking
their user talk notifications as read when they visit their user talk
page. Whether the displayed notification count will change has no
bearing on whether these notifications should be marked as read (and now
that bundled notifications are counted individually, the displayed count
actually could change).
Bug: T164860
Change-Id: I3ff5c9b31307839b9336bd8856015db9baa52fad
* Move revision ids out of configuration and into MWEchoEventLogging
class. Because the EchoInteraction schema is used both server and
client, we have to duplicate the revision id.
* Use EventLoggingSchemas attribute to register client-side schema in
extension.json instead of a hook.
* Check if EventLogging is enabled in MWEchoEventLogging instead of
$wgExtensionFunctions.
* Pass only whether the EchoInteraction schema is enabled to the
client-side instead of all of $wgEchoEventLoggingSchemas.
Change-Id: I968294f96cedac19dc9d8f53df14fecfb666ceee
Also test it more meaningfully by setting up a mock database and
asserting that the right DELETE queries are issued.
Change-Id: Id39723b92118e98d9c9f0cd7381e9396dce67c17
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation
Change-Id: Ic47b8d7162022f983ad00a7337fa0ce6f18d2c83
The only place that reads the config variable is in ext.echo.logger,
which uses OO.getProp() to do so. If that property doesn't exist,
`undefined` will be returned, which we can force to boolean false.
Bug: T118488
Change-Id: Iac352b133950f6f2e4b88950c1fcd0c893284fd9
This avoids needing any dependencies on EventLogging in the module
definition, as well as allowing the extra dependencies to be lazy-loaded
as necessary.
Change-Id: I49b5be4be4f55cd4e27064247463b2ddb8e81296
$wgExtensionFunctions are run on every MediaWiki request, and should be
avoided unless necessary. Default user options should be controlled by
the UserGetDefaultOptions hook instead.
Bug: T180192
Change-Id: I2a79e078753d289c3ea2f04b613ce72c59a9e59a
This sets $wgLanguageCode appropriately. It will also be necessary when
$wgContLang becomes a service, in which case setting the global directly
will not work correctly.
Bug: T200246
Change-Id: I4aaf1c641ec6abef214eb96c0e4b42a67488ac00
Makes so many things simpler and robust.
Bug: T198935
Change-Id: Ia836f8f497cae8599f85cf86a7f6b299cd012e81
Depends-On: Iff63da0d215585cfcf083e7f7ec8ed45d5b77301