Replace deprecated Context::getStats() with MWServices::getStatsdDataFactory()

Change-Id: Ia0791472c3569edc269d993bd0d91becd56e70da
This commit is contained in:
WMDE-Fisch 2017-03-17 12:16:28 +01:00
parent cf7e844076
commit f714ff5d74

View file

@ -2,6 +2,7 @@
use MediaWiki\Auth\AuthManager;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
class EchoHooks {
public static function registerExtension() {
@ -999,7 +1000,7 @@ class EchoHooks {
if ( $hasUnseen ) {
// Record that the user is going to see an indicator that they have unread notifications
RequestContext::getMain()->getStats()->increment( 'echo.unseen' );
MediaWikiServices::getInstance()->getStatsdDataFactory()->increment( 'echo.unseen' );
}
// If the user has new messages, display a talk page alert