(bug 32358) Do not display "No higher resolution available" if the file doesn't have...
authorBrian Wolff <bawolff@users.mediawiki.org>
Fri, 11 Nov 2011 15:59:40 +0000 (15:59 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Fri, 11 Nov 2011 15:59:40 +0000 (15:59 +0000)
RELEASE-NOTES-1.19
includes/ImagePage.php

index e645fa2..1a2848d 100644 (file)
@@ -129,6 +129,8 @@ production.
 * (bug 30232) add current time to message wlnote on Special:Watchlist
 * (bug 29110) $wgFeedDiffCutoff did not affect new pages
 * (bug 32168) Add wfRemoveDotSegments for use in wfExpandUrl
+* (bug 32358) Do not display "No higher resolution available" for dimensionless
+  files (like audio files)
 
 === API changes in 1.19 ===
 * (bug 19838) siprop=interwikimap can now use the interwiki cache.
index fb25284..f98466a 100644 (file)
@@ -335,6 +335,10 @@ class ImagePage extends Article {
                                                        wfMessage( 'show-big-image-other' )->
                                                        rawParams( $wgLang->pipeList( $otherSizes ), count( $otherSizes ) )->parse()
                                                );
+                               } elseif ( $width == 0 && $height == 0 ){
+                                       # Some sort of audio file that doesn't have dimensions
+                                       # Don't output a no hi res message for such a file
+                                       $msgsmall = '';
                                } else {
                                        # Image is small enough to show full size on image page
                                        $msgsmall = wfMessage( 'file-nohires' )->parse();