mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
MWEchoEventLogging: Use $revId of -1 for Echo* schemas
EventLogging::logEvent() overwrides the $revId parameter when the schema has been migrated to the Event Platform. Add a note and use a $revId of -1 to make this consistent with other calls to EventLogging::logEvent() for schemas that have been migrated to the Event Platform [0]. [0] https://codesearch.wmcloud.org/search/?q=%3A%3AlogEvent%5C(%20%27%5Cw%2B%27%2C%20-1 Bug: T318263 Change-Id: I5fa515d853326307619b044d25c2f672bcb6de63
This commit is contained in:
parent
2abf220e58
commit
844a64ff9a
|
@ -11,13 +11,6 @@ use MediaWiki\User\UserIdentity;
|
|||
*/
|
||||
class MWEchoEventLogging {
|
||||
|
||||
/** @var array */
|
||||
private static $revisionIds = [
|
||||
// Keep in sync with extension.json
|
||||
'EchoMail' => '/analytics/legacy/echomail/1.0.0',
|
||||
'EchoInteraction' => '/analytics/legacy/echointeraction/1.0.0'
|
||||
];
|
||||
|
||||
/**
|
||||
* This is the only function that interacts with EventLogging
|
||||
*
|
||||
|
@ -37,10 +30,12 @@ class MWEchoEventLogging {
|
|||
return;
|
||||
}
|
||||
|
||||
$revision = self::$revisionIds[$schema];
|
||||
$data['version'] = $wgEchoEventLoggingVersion;
|
||||
|
||||
EventLogging::logEvent( $schema, $revision, $data );
|
||||
// NOTE: The 'EchoMail' and 'EchoInteraction' events were migrated to the Event Platform
|
||||
// and are no longer using the legacy EventLogging schema from metawiki. $revId is actually
|
||||
// overridden by the EventLoggingSchemas extension attribute in extension.json.
|
||||
EventLogging::logEvent( $schema, -1, $data );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue