From 6004c56463d1d492fdde43aaaa1dd6c3ea9ede6c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Aug 2008 20:55:25 +0000 Subject: [PATCH] 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 --- includes/ImagePage.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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() ) { -- 2.20.1