From c317d3feab6602a2bafd635903e7c2526a070f0b Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Fri, 11 Nov 2011 15:59:40 +0000 Subject: [PATCH] (bug 32358) Do not display "No higher resolution available" if the file doesn't have dimensions (like an audio file) --- RELEASE-NOTES-1.19 | 2 ++ includes/ImagePage.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index e645fa2dcf..1a2848d58d 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -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. diff --git a/includes/ImagePage.php b/includes/ImagePage.php index fb25284f49..f98466a4d1 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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(); -- 2.20.1