X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryImageInfo.php;h=8dbd812c78193bdfbcb8298892847348d27bbdb9;hb=28c98539cd0fd4a1cf5e9ce7662b7a360fb64dbb;hp=ba36c67f3ab3a630cec78c7e63908cff9582974b;hpb=7b0df4e54913bcebb312279642e9bc19a6d366d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index ba36c67f3a..8dbd812c78 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -225,8 +225,6 @@ class ApiQueryImageInfo extends ApiQueryBase { * @return array|null Key-val array of 'width' and 'height', or null */ public function getScale( $params ) { - $p = $this->getModulePrefix(); - if ( $params['urlwidth'] != -1 ) { $scale = array(); $scale['width'] = $params['urlwidth']; @@ -339,7 +337,8 @@ class ApiQueryImageInfo extends ApiQueryBase { // in the actual normalised version, only if we can actually normalise them, // so we use the functions scope to throw away the normalisations. if ( !$h->normaliseParams( $image, $finalParams ) ) { - $this->dieUsage( "Could not normalise image parameters for " . $image->getName(), "urlparamnormal" ); + $this->dieUsage( 'Could not normalise image parameters for ' . + $image->getName(), 'urlparamnormal' ); } } @@ -480,7 +479,7 @@ class ApiQueryImageInfo extends ApiQueryBase { } if ( !$canShowField( File::DELETED_FILE ) ) { - //Early return, tidier than indenting all following things one level + // Early return, tidier than indenting all following things one level return $vals; } @@ -514,12 +513,12 @@ class ApiQueryImageInfo extends ApiQueryBase { $vals['thumberror'] = $mto->toText(); } } - $vals['url'] = wfExpandUrl( $file->getFullURL(), PROTO_CURRENT ); + $vals['url'] = wfExpandUrl( $file->getFullUrl(), PROTO_CURRENT ); $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl(), PROTO_CURRENT ); } if ( $sha1 ) { - $vals['sha1'] = wfBaseConvert( $file->getSha1(), 36, 16, 40 ); + $vals['sha1'] = Wikimedia\base_convert( $file->getSha1(), 36, 16, 40 ); } if ( $meta ) {