Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/203224
Change subject: Fix schema for GatherClicks
......................................................................
Fix schema for GatherClicks
In process generalise the schema so it can be used on desktop.
Bug: T95615
Change-Id: I3a431ed29ed1246458f523d84ba8b3528b05a0af
---
M includes/Gather.hooks.php
M resources/ext.gather.logging/SchemaGather.js
2 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Gather
refs/changes/24/203224/1
diff --git a/includes/Gather.hooks.php b/includes/Gather.hooks.php
index 8d00199..c2b4cbe 100644
--- a/includes/Gather.hooks.php
+++ b/includes/Gather.hooks.php
@@ -61,7 +61,7 @@
*/
public static function onEventLoggingRegisterSchemas( &$schemas ) {
$schemas += array(
- 'GatherClicks' => 11639881,
+ 'GatherClicks' => 11770314,
);
self::registerSchemas( array( 'schema.GatherClicks' ) );
return true;
diff --git a/resources/ext.gather.logging/SchemaGather.js
b/resources/ext.gather.logging/SchemaGather.js
index 3c38838..2438288 100644
--- a/resources/ext.gather.logging/SchemaGather.js
+++ b/resources/ext.gather.logging/SchemaGather.js
@@ -1,8 +1,14 @@
( function ( M, $ ) {
var SchemaGather,
+ skinName = mw.config.get( 'skin' ),
+ context = M.require( 'context' ),
+ mobileMode = context.getMode(),
Schema = M.require( 'Schema' ),
user = M.require( 'user' );
+ if ( mobileMode ) {
+ skinName += '-' + mobileMode;
+ }
/**
* @class SchemaGather
* @extends Schema
@@ -12,6 +18,7 @@
* @inheritdoc
*/
defaults: $.extend( {}, Schema.prototype.defaults, {
+ skin: skinName,
userId: mw.user.getId(),
// FIXME: use mw.user when method available
// Null when user is anon, set to 0
--
To view, visit https://gerrit.wikimedia.org/r/203224
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a431ed29ed1246458f523d84ba8b3528b05a0af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits