mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-23 23:43:54 +00:00
Update TemplateDataEditor logging for IP masking
Bug: T332434 Change-Id: I9935e7d35b1cdb14c0958351cd84d9d6476d6363
This commit is contained in:
parent
0298a2d116
commit
f2c89028bd
|
@ -135,7 +135,8 @@ class Hooks {
|
|||
}
|
||||
|
||||
$generatorUsed = RequestContext::getMain()->getRequest()->getBool( 'TemplateDataGeneratorUsed' );
|
||||
$userEditCount = MediaWikiServices::getInstance()->getUserEditTracker()->getUserEditCount( $user );
|
||||
$userEditCount = $services->getUserEditTracker()->getUserEditCount( $user );
|
||||
$userId = $services->getUserNameUtils()->isTemp( $user->getName() ) ? 0 : $user->getId();
|
||||
// Note: We know that irrelevant changes (e.g. whitespace changes) aren't logged here
|
||||
EventLogging::submit(
|
||||
'eventlogging_TemplateDataEditor',
|
||||
|
@ -150,7 +151,7 @@ class Hooks {
|
|||
'page_title' => $page->getDBkey(),
|
||||
'rev_id' => $revisionRecord->getId() ?? 0,
|
||||
'user_edit_count' => $userEditCount ?? 0,
|
||||
'user_id' => $user->getId(),
|
||||
'user_id' => $userId,
|
||||
],
|
||||
]
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@ function logEvent( eventName ) {
|
|||
page_namespace: mw.config.get( 'wgNamespaceNumber' ),
|
||||
rev_id: mw.config.get( 'wgCurRevisionId' ),
|
||||
user_edit_count: mw.config.get( 'wgUserEditCount', 0 ),
|
||||
user_id: mw.user.getId()
|
||||
user_id: mw.user.isNamed() ? mw.user.getId() : 0
|
||||
};
|
||||
|
||||
var editCountBucket = mw.config.get( 'wgUserEditCountBucket' );
|
||||
|
|
Loading…
Reference in a new issue