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:
Ori Livneh 2013-06-14 11:13:59 -07:00
parent beaf7a588c
commit fe54db5141
2 changed files with 4 additions and 3 deletions

View file

@ -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 ' .

View file

@ -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' )
} );
} );
};