From: Brion Vibber Date: Fri, 8 Aug 2008 20:55:25 +0000 (+0000) Subject: Cleanup to r38799 ("Add a more descriptive message to the links-to-image section... X-Git-Tag: 1.31.0-rc.0~46002 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=6004c56463d1d492fdde43aaaa1dd6c3ea9ede6c;p=lhc%2Fweb%2Fwiklou.git Cleanup to r38799 ("Add a more descriptive message to the links-to-image section for the case that more than 100 pages link to a file.") Lift out a little duplicated code for good style --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index ae0c8c9e87..496030374c 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -645,17 +645,17 @@ EOT $wgOut->addWikiMsg( 'nolinkstoimage' ); $wgOut->addHTML( "\n" ); return; - } elseif ( $count <= $limit - 1 ) { - $wgOut->addHTML( "
\n" ); + } + + $wgOut->addHTML( "
\n" ); + if ( $count <= $limit - 1 ) { $wgOut->addWikiMsg( 'linkstoimage', $count ); - $wgOut->addHTML( "
    \n" ); } else { // More links than the limit. Add a link to [[Special:Whatlinkshere]] - $wgOut->addHTML( "
    \n" ); $wgOut->addWikiMsg( 'linkstoimage-more', $limit, $this->mTitle->getPrefixedDBkey() ); - $wgOut->addHTML( "
      \n" ); } + $wgOut->addHTML( "
        \n" ); $sk = $wgUser->getSkin(); $count = 0; while ( $s = $res->fetchObject() ) {