From: Bryan Tong Minh Date: Fri, 27 Jan 2012 22:44:46 +0000 (+0000) Subject: Follow-up r83791: do not show size links for wikis which do not use a 404 transform... X-Git-Tag: 1.31.0-rc.0~25046 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=810bb7b79f259e42a136ec506bd564fcf80fa6a0;p=lhc%2Fweb%2Fwiklou.git Follow-up r83791: do not show size links for wikis which do not use a 404 transform, since this is a rather expensive operation, which can delay loading for several seconds. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 56dda5431f..72d22ab31a 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -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 diff --git a/includes/ImagePage.php b/includes/ImagePage.php index a44a7d353d..eacfd358fd 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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