X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=thumb.php;h=d97f8e8eacd461c971ca88ebb5610d077ba25b83;hb=77795a88c1a8750a359825bf2edcd029a71a912d;hp=de201b914c9589a5102189b4f650676c6524e07f;hpb=4c5e3357f16be0d2e05bbd27d6cdcae148581b8b;p=lhc%2Fweb%2Fwiklou.git 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' ) ] );