X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=thumb.php;h=d97f8e8eacd461c971ca88ebb5610d077ba25b83;hp=de201b914c9589a5102189b4f650676c6524e07f;hb=6ffa1e302eaf2f4fdb7baeec541ba89f9c37fd6d;hpb=5300df4838f68437c17d5d697de57a46f0b5e02c diff --git a/thumb.php b/thumb.php index de201b914c..d97f8e8eac 100644 --- a/thumb.php +++ b/thumb.php @@ -22,6 +22,7 @@ */ use MediaWiki\Logger\LoggerFactory; +use MediaWiki\MediaWikiServices; define( 'MW_NO_OUTPUT_COMPRESSION', 1 ); require __DIR__ . '/includes/WebStart.php'; @@ -317,7 +318,9 @@ function wfStreamThumb( array $params ) { $streamtime = microtime( true ) - $starttime; if ( $status->isOK() ) { - RequestContext::getMain()->getStats()->timing( 'media.thumbnail.stream', $streamtime ); + MediaWikiServices::getInstance()->getStatsdDataFactory()->timing( + 'media.thumbnail.stream', $streamtime + ); } else { wfThumbError( 500, 'Could not stream the file', null, [ 'file' => $thumbName, 'path' => $thumbPath, 'error' => $status->getWikiText( false, false, 'en' ) ] );