Ensure logo preload transforms urls if needed
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderModule.php
index a2b4b1d..5404e0f 100644 (file)
@@ -147,8 +147,8 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
                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 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
         */
        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)