From 56964957545d6cea69e792425128954434689b0a Mon Sep 17 00:00:00 2001 From: David Lynch Date: Tue, 12 Jan 2021 00:34:24 -0600 Subject: [PATCH] Give new-section a specific init_type to distinguish it Bug: T265099 Change-Id: I0117a41ec44263162621a34cf045b13650c6918c --- modules/CommentController.js | 6 +++++- modules/NewTopicController.js | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/CommentController.js b/modules/CommentController.js index 88494e6fd..ac594c7b3 100644 --- a/modules/CommentController.js +++ b/modules/CommentController.js @@ -98,6 +98,10 @@ CommentController.prototype.getTranscludedFromSource = function ( commentId ) { return promise; }; +/* Static properties */ + +CommentController.static.initType = 'page'; + /* Methods */ CommentController.prototype.onReplyLinkClick = function ( e ) { @@ -143,7 +147,7 @@ CommentController.prototype.setup = function ( mode ) { logger( { action: 'init', - type: 'page', + type: this.constructor.static.initType || 'page', mechanism: 'click', // TODO: Use 'wikitext-2017' when config.enable2017Wikitext is set // eslint-disable-next-line camelcase diff --git a/modules/NewTopicController.js b/modules/NewTopicController.js index 67caffff7..8e41bb841 100644 --- a/modules/NewTopicController.js +++ b/modules/NewTopicController.js @@ -36,6 +36,10 @@ function NewTopicController( $pageContainer, $replyLink ) { OO.inheritClass( NewTopicController, CommentController ); +/* Static properties */ + +NewTopicController.static.initType = 'section'; + /* Methods */ /**