Follow-up r83791: do not show size links for wikis which do not use a 404 transform...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 27 Jan 2012 22:44:46 +0000 (22:44 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 27 Jan 2012 22:44:46 +0000 (22:44 +0000)
RELEASE-NOTES-1.19
includes/ImagePage.php

index 56dda54..72d22ab 100644 (file)
@@ -239,6 +239,7 @@ production.
   the edit.
 * (bug 33902) Decoding %2B with mw.Uri.decode results in ' ' instead of +
 * (bug 33762) QueryPage-based special pages no longer misses *-summary message.
+* Other sizes links are no longer generated for wikis without a 404 thumbnail handler.
 
 === API changes in 1.19 ===
 * Made action=edit less likely to return "unknownerror", by returning the actual error
index a44a7d3..eacfd35 100644 (file)
@@ -330,11 +330,14 @@ class ImagePage extends Article {
                                        }
                                        $msgsmall = wfMessage( 'show-big-image-preview' )->
                                                rawParams( $this->makeSizeLink( $params, $width, $height ) )->
-                                               parse() . ' ' .
+                                               parse();
+                                       if ( count( $otherSizes ) && $this->displayImg->getRepo()->transformVia404 ) {
+                                               $msgsmall .= ' ' .
                                                Html::rawElement( 'span', array( 'class' => 'mw-filepage-other-resolutions' ),
                                                        wfMessage( 'show-big-image-other' )->rawParams( $wgLang->pipeList( $otherSizes ) )->
                                                        params( 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