mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 10:48:42 +00:00
Log user ID; 'pageViewSessionId' to alphanum string
By default, EventLogging uses INT columns for integers, which pageViewSessionId overflows. I changed it to a STRING type in the schema and am now generating it using 'mw.user.generateRandomSessionId()'. I also introduced a 'userId' property, per bug 49585. Bug: 49585 Bug: 49586 Change-Id: Iddb9eb9c64b55b25445ddf9e474d312b685978a6
This commit is contained in:
parent
beaf7a588c
commit
fe54db5141
|
@ -22,7 +22,7 @@ class VisualEditorHooks {
|
|||
$wgResourceModules['schema.Edit'] = array(
|
||||
'class' => 'ResourceLoaderSchemaModule',
|
||||
'schema' => 'Edit',
|
||||
'revision' => 5563071,
|
||||
'revision' => 5570274,
|
||||
);
|
||||
} else {
|
||||
wfWarn( 'VisualEditor is configured to use EventLogging, but the extension is ' .
|
||||
|
|
|
@ -847,10 +847,11 @@ ve.init.mw.ViewPageTarget.prototype.setUpEventLogging = function () {
|
|||
pageId: mw.config.get( 'wgArticleId' ),
|
||||
pageNs: mw.config.get( 'wgNamespaceNumber' ),
|
||||
pageName: mw.config.get( 'wgPageName' ),
|
||||
pageViewSessionId: +new Date(),
|
||||
pageViewSessionId: mw.user.generateRandomSessionId(),
|
||||
revId: function () {
|
||||
return mw.config.get( 'wgCurRevisionId' );
|
||||
}
|
||||
},
|
||||
userId: +mw.config.get( 'wgUserId' )
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue