Replace wfBaseConvert with Wikimedia\base_convert
[lhc/web/wiklou.git] / includes / api / ApiQueryImageInfo.php
index c769024..8dbd812 100644 (file)
@@ -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' );
                }
        }
 
@@ -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 ) {