The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: Ia8cbc992eb80ee6d531cf11bdf2bc06181bce8b0
User::getId() is typehinted to return int and so this cast is causing
Phan failure.
Note the method is deprecated but this patch is not meant to fix that.
Change-Id: I3b7ad419d7c28c3ad7144b8005f2fa387af58b0d
isRegistered is part of the slick UserIdentity interface, i.e.
it's the more "canonical" form. This change makes it a bit
easier to move away from using the huge (4000+ LOC) User class
everywhere, in favor of the UserIdentity interface, where
possible.
This patch is meant as a small step towards this goal. I tried
to replace some usages of User type hints already, but prefer
to go in small, incremental steps.
Change-Id: I039c7a18672dfb6ea9507752bce9ea754babd690
This code improvements seeks to improve on code readability, consistency,
maintainability and efficiency.
Change-Id: I4f07886044e9a75824f9e7ddad039f3112b1c4a1
* 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
$wgEchoConfig is a deeply nested structure that ExtensionRegistry can't handle well.
It also combined different things, and the version number was used for two
separate purposes.
Split this out into $wgEchoCacheVersion, $wgEchoEventLoggingVersion
and $wgEchoEventLoggingSchemas.
Change-Id: I2f9d5d111f7925fb057d423a3e7064bff5040205
'version' was missing, making the event invalid, causing it to
not reach the database.
Factor out this field to logEvent
Bug: T121939
Change-Id: I9e4bb5574d69495cb5f53830047c68104c6ad10f
We have a convention to put a logger helper function in
MWEchoEventLogging, so also enforce that:
* Rename to actuallyLogTheEvent to logEvent and centralize the
'enabled' check there.
* Make that protected, so new schemas also use a helper function
for consistency.
Bug: T143092
Change-Id: I8085fc5898f3420172355c5a2df04aac6add9acd
Adds a check before logging a visit to Special:Notifications
added in Icfe63fb8daa8e8fba029e22b4de3e4f65517c448
Bug: T143092
Change-Id: I9e58ba35eef6a25a78e96a76facc04819cef37da
This patch updates Echo to revision 6081131 of Schema:Echo, adding a 'rev_id'
field and the code to populate it. The patch also increments the logging
version identifier to 1.5.
Bug: 46045
Change-Id: I4ac1a25c306b0e0983a3490a29fe3dc4aa4bfc6f
Echo preference change is already captured in the general
preference change eventlogging, this is just a duplicate
Change-Id: I49cd2ad5776a670e2cd28414e156f5201087ded0