From 015acb5407804afde04521f5f245bd108b763f74 Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Thu, 4 Aug 2016 14:51:59 -0700 Subject: [PATCH] Log Special:Notifications page visits Bug: T121939 Change-Id: Icfe63fb8daa8e8fba029e22b4de3e4f65517c448 --- Echo.php | 2 +- includes/special/SpecialNotifications.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Echo.php b/Echo.php index 0dcc4b7ed..d1ea43ccd 100644 --- a/Echo.php +++ b/Echo.php @@ -568,7 +568,7 @@ $wgEchoConfig = array( ), 'EchoInteraction' => array( 'enabled' => false, - 'revision' => 15180901, + 'revision' => 15823738, 'client' => true, ), ) diff --git a/includes/special/SpecialNotifications.php b/includes/special/SpecialNotifications.php index 5447886fb..396fb1a9b 100644 --- a/includes/special/SpecialNotifications.php +++ b/includes/special/SpecialNotifications.php @@ -157,6 +157,20 @@ class SpecialNotifications extends SpecialPage { ) ); // For no-js support $out->addModuleStyles( array( 'ext.echo.styles.notifications', 'ext.echo.styles.special' ) ); + + // Log visit + MWEchoEventLogging::actuallyLogTheEvent( + 'EchoInteraction', + array( + 'context' => 'archive', + 'action' => 'special-page-visit', + 'userId' => (int)$user->getId(), + 'editCount' => (int)$user->getEditCount(), + 'notifWiki' => wfWikiID(), + // Hack: Figure out if we are in the mobile skin + 'mobile' => $out->getSkin()->getSkinName() === 'minerva', + ) + ); } /**