Use StatsdDataFactory service instead of deprecated RequestContext method

Change-Id: Ie291146f67b525d891614c23b17052500fc8aa51
This commit is contained in:
Leszek Manicki 2016-07-15 18:02:34 +02:00
parent e7b7d95313
commit 6dcb872a7b

View file

@ -1,5 +1,7 @@
<?php
use MediaWiki\MediaWikiServices;
abstract class EchoDiscussionParser {
const HEADER_REGEX = '^(==+)\s*([^=].*)\s*\1$';
@ -151,7 +153,7 @@ abstract class EchoDiscussionParser {
}
$mentionedUsers = array();
$count = 0;
$stats = RequestContext::getMain()->getStats();
$stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
foreach ( $links[NS_USER] as $dbk => $page_id ) {
$user = User::newFromName( $dbk );