X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryImageInfo.php;h=4b49a80a239b3c32aaa79430c7f5ee0768bd846c;hb=de7d383d8f840ef33a79fd5b5f06c5ebcbf74905;hp=5a82f199631165acb9b01d702526b3a04a145f31;hpb=49952a405014c89b239da3bcaea158c47faf8251;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 5a82f19963..4b49a80a23 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -256,15 +256,13 @@ class ApiQueryImageInfo extends ApiQueryBase { * @return array Array of parameters for transform. */ protected function mergeThumbParams( $image, $thumbParams, $otherParams ) { - global $wgThumbLimits; - if ( !isset( $thumbParams['width'] ) && isset( $thumbParams['height'] ) ) { // We want to limit only by height in this situation, so pass the // image's full width as the limiting width. But some file types // don't have a width of their own, so pick something arbitrary so // thumbnailing the default icon works. if ( $image->getWidth() <= 0 ) { - $thumbParams['width'] = max( $wgThumbLimits ); + $thumbParams['width'] = max( $this->getConfig()->get( 'ThumbLimits' ) ); } else { $thumbParams['width'] = $image->getWidth(); }