Florianschmidtwelzow has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/348470 )
Change subject: Remove usages of RequestContext::getStats() ...................................................................... Remove usages of RequestContext::getStats() Bug: T156810 Change-Id: Ic07896a68389e20ce0a35a06049b8c51b6c3f699 --- M includes/GlobalFunctions.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/70/348470/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 243d066..9b5feef 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1197,7 +1197,9 @@ $statsdSender = new SocketSender( $statsdHost, $statsdPort ); $statsdClient = new SamplingStatsdClient( $statsdSender, true, false ); $statsdClient->setSamplingRates( $config->get( 'StatsdSamplingRates' ) ); - $statsdClient->send( $context->getStats()->getBuffer() ); + $statsdClient->send( + \MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory()->getBuffer() + ); } catch ( Exception $ex ) { MWExceptionHandler::logException( $ex ); } @@ -1262,7 +1264,7 @@ * @return void */ function wfIncrStats( $key, $count = 1 ) { - $stats = RequestContext::getMain()->getStats(); + $stats = \MediaWiki\MediaWikiServices::getInstance()->getStatsdDataFactory(); $stats->updateCount( $key, $count ); } -- To view, visit https://gerrit.wikimedia.org/r/348470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic07896a68389e20ce0a35a06049b8c51b6c3f699 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits