From: Derk-Jan Hartman Date: Sun, 20 Jun 2010 16:13:24 +0000 (+0000) Subject: Don't override the default Bitmap.php information in the longDescription() for GIF... X-Git-Tag: 1.31.0-rc.0~36446 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=01a69cb53301b2daadf3cfadb91dba9de2324ccd;p=lhc%2Fweb%2Fwiklou.git Don't override the default Bitmap.php information in the longDescription() for GIF images, simply append. --- diff --git a/includes/media/GIF.php b/includes/media/GIF.php index 636ae6480d..4679963fb5 100644 --- a/includes/media/GIF.php +++ b/includes/media/GIF.php @@ -63,16 +63,17 @@ class GIFHandler extends BitmapHandler { function getLongDesc( $image ) { global $wgUser, $wgLang; $sk = $wgUser->getSkin(); + $original = parent::getLongDesc( $image ); wfSuppressWarnings(); $metadata = unserialize($image->getMetadata()); wfRestoreWarnings(); - if (!$metadata) return parent::getLongDesc( $image ); + if (!$metadata || $metadata['frameCount'] <= 1) + return $original; $info = array(); - $info[] = $image->getMimeType(); - $info[] = $sk->formatSize( $image->getSize() ); + $info[] = substr( $original, 1, strlen( $original )-2 ); if ($metadata['looped']) $info[] = wfMsgExt( 'file-info-gif-looped', 'parseinline' );