X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2Fmedia%2FGIF.php;h=94aca615ae7fcce102121b4da8d254718fa97023;hb=f8ab4e5ffee1cfb53da38d3dffcd37ffe4e2abbc;hp=bde889c86c184ba0720fda17b94c2d16f7c533cc;hpb=6abd85ca9210551ad8f09d2d2424350fc0b21cb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/GIF.php b/includes/media/GIF.php index bde889c86c..94aca615ae 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -44,15 +44,16 @@ class GIFHandler extends BitmapHandler { /** * @param File $image + * @param bool|IContextSource $context Context to use (optional) * @return array|bool */ - function formatMetadata( $image ) { + function formatMetadata( $image, $context = false ) { $meta = $this->getCommonMetaArray( $image ); if ( count( $meta ) === 0 ) { return false; } - return $this->formatMetadataHelper( $meta ); + return $this->formatMetadataHelper( $meta, $context ); } /** @@ -78,7 +79,7 @@ class GIFHandler extends BitmapHandler { /** * @todo Add unit tests * - * @param File$image + * @param File $image * @return bool */ function getImageArea( $image ) { @@ -130,9 +131,9 @@ class GIFHandler extends BitmapHandler { return self::METADATA_GOOD; } - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $data = unserialize( $metadata ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( !$data || !is_array( $data ) ) { wfDebug( __METHOD__ . " invalid GIF metadata\n" ); @@ -160,9 +161,9 @@ class GIFHandler extends BitmapHandler { $original = parent::getLongDesc( $image ); - wfSuppressWarnings(); + MediaWiki\suppressWarnings(); $metadata = unserialize( $image->getMetadata() ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); if ( !$metadata || $metadata['frameCount'] <= 1 ) { return $original;