* @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'];
// 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' );
}
}
$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 ) {