jenkins-bot has submitted this change and it was merged.
Change subject: Support legacy banner_count field for S:RI
......................................................................
Support legacy banner_count field for S:RI
Change-Id: I84e1a0f11ca448cb49b08c122c783528ce9c2aa2
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
2 files changed, 12 insertions(+), 0 deletions(-)
Approvals:
Awight: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/subscribing/ext.centralNotice.display.js
b/resources/subscribing/ext.centralNotice.display.js
index 8b4a929..ec45642 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -346,6 +346,11 @@
state.setBannerLoadedButHidden(
bannerLoadedButHiddenReason );
}
+
+ if ( tmpData.banner_count ) {
+ state.setBannerCount(
tmpData.banner_count );
+ }
+
} else {
state.setAlterFunctionMissing();
}
diff --git a/resources/subscribing/ext.centralNotice.display.state.js
b/resources/subscribing/ext.centralNotice.display.state.js
index 4176da0..5341107 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -294,6 +294,13 @@
state.data.result = 'show';
},
+ /**
+ * Sets banner_count, a legacy field for
Special:RecordImpression
+ */
+ setBannerCount: function ( bannerCount ) {
+ state.data.banner_count = bannerCount;
+ },
+
setRecordImpressionSampleRate: function( rate ) {
state.data.recordImpressionSampleRate = rate;
}
--
To view, visit https://gerrit.wikimedia.org/r/235381
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I84e1a0f11ca448cb49b08c122c783528ce9c2aa2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits