From: jenkins-bot Date: Mon, 20 Mar 2017 09:32:47 +0000 (+0000) Subject: Merge "Replace deprecated Context::getStats() with MWServices::getStatsdDataFactory()" X-Git-Tag: 1.31.0-rc.0~3757 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=aa5eca02b3da03aae34269d823b26fe5609ed051;hp=-c;p=lhc%2Fweb%2Fwiklou.git Merge "Replace deprecated Context::getStats() with MWServices::getStatsdDataFactory()" --- aa5eca02b3da03aae34269d823b26fe5609ed051 diff --combined includes/resourceloader/ResourceLoaderModule.php index 5b862e4a21,b122fe2a10..5404e0fb9b --- a/includes/resourceloader/ResourceLoaderModule.php +++ b/includes/resourceloader/ResourceLoaderModule.php @@@ -147,8 -147,8 +147,8 @@@ abstract class ResourceLoaderModule imp if ( $deprecationInfo ) { $name = $this->getName(); $warning = 'This page is using the deprecated ResourceLoader module "' . $name . '".'; - if ( !is_bool( $deprecationInfo ) && isset( $deprecationInfo['message'] ) ) { - $warning .= "\n" . $deprecationInfo['message']; + if ( is_string( $deprecationInfo ) ) { + $warning .= "\n" . $deprecationInfo; } return Xml::encodeJsCall( 'mw.log.warn', @@@ -624,7 -624,7 +624,7 @@@ */ final protected function buildContent( ResourceLoaderContext $context ) { $rl = $context->getResourceLoader(); - $stats = RequestContext::getMain()->getStats(); + $stats = MediaWikiServices::getInstance()->getStatsdDataFactory(); $statStart = microtime( true ); // Only include properties that are relevant to this context (e.g. only=scripts)