Index: trunk/phase3/includes/media/GIF.php |
— | — | @@ -63,16 +63,17 @@ |
64 | 64 | function getLongDesc( $image ) { |
65 | 65 | global $wgUser, $wgLang; |
66 | 66 | $sk = $wgUser->getSkin(); |
| 67 | + $original = parent::getLongDesc( $image ); |
67 | 68 | |
68 | 69 | wfSuppressWarnings(); |
69 | 70 | $metadata = unserialize($image->getMetadata()); |
70 | 71 | wfRestoreWarnings(); |
71 | 72 | |
72 | | - if (!$metadata) return parent::getLongDesc( $image ); |
| 73 | + if (!$metadata || $metadata['frameCount'] <= 1) |
| 74 | + return $original; |
73 | 75 | |
74 | 76 | $info = array(); |
75 | | - $info[] = $image->getMimeType(); |
76 | | - $info[] = $sk->formatSize( $image->getSize() ); |
| 77 | + $info[] = substr( $original, 1, strlen( $original )-2 ); |
77 | 78 | |
78 | 79 | if ($metadata['looped']) |
79 | 80 | $info[] = wfMsgExt( 'file-info-gif-looped', 'parseinline' ); |