AndyRussG has uploaded a new change for review.
https://gerrit.wikimedia.org/r/248925
Change subject: BannerHistoryLogger: futher minify EL data and always include
campaign
......................................................................
BannerHistoryLogger: futher minify EL data and always include campaign
Bug: T116613
Change-Id: Iaf5e7d1ece1c5cca8e2662db5994ba1f605f4474
---
M CentralNotice.hooks.php
M resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
2 files changed, 13 insertions(+), 17 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/25/248925/1
diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 7a09271..a63af4c 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -476,6 +476,6 @@
function efCentralNoticeEventLoggingRegisterSchemas( &$schemas ) {
// Coordinate with makeEventLoggingURL() in
// ext.centralNotice.bannerHistoryLogger.js
- $schemas['CentralNoticeBannerHistory'] = 13447710;
+ $schemas['CentralNoticeBannerHistory'] = 14321636;
return true;
}
diff --git a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
index acc60e1..0e18086 100644
--- a/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
+++ b/resources/subscribing/ext.centralNotice.bannerHistoryLogger.js
@@ -137,14 +137,14 @@
kvError = cn.kvStore.getError(),
i, logEntry, elLogEntry;
+ // Log ID: should be generated before this is called, and
should not be
+ // persisted anywhere on the client (see below).
+ elData.i = bhLogger.id;
+
// sample rate
if ( rate ) {
elData.r = rate;
}
-
- // Log ID: should be generated before this is called, and
should not be
- // persisted anywhere on the client (see below).
- elData.i = bhLogger.id;
// if applicable, the message from any kv store error
if ( kvError ) {
@@ -163,18 +163,14 @@
while ( i >= 0 ) {
logEntry = log[i];
- elLogEntry = {
- t: logEntry.time,
- s: logEntry.statusCode
- };
+ elLogEntry = [
+ logEntry.banner || '',
+ logEntry.campaign,
+ logEntry.time,
+ logEntry.statusCode
+ ];
- if ( logEntry.banner ) {
- elLogEntry.b = logEntry.banner;
- } else {
- elLogEntry.c = logEntry.campaign;
- }
-
- elData.l.unshift ( elLogEntry );
+ elData.l.unshift ( elLogEntry.join( '|' ) );
if ( !checkEventLoggingURLSize( elData ) ) {
elData.l.shift();
@@ -254,7 +250,7 @@
function makeEventLoggingURL( elData ) {
return mw.eventLog.makeBeaconUrl( {
event : elData,
- revision : 13447710, // Coordinate with
CentralNotice.hooks.php
+ revision : 14321636, // Coordinate with
CentralNotice.hooks.php
schema : EVENT_LOGGING_SCHEMA,
webHost : location.hostname,
wiki : mw.config.get( 'wgDBname' )
--
To view, visit https://gerrit.wikimedia.org/r/248925
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf5e7d1ece1c5cca8e2662db5994ba1f605f4474
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits