From d3f564d27fb0377e70db3460e281dc06c47f8858 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 10 Jun 2008 11:19:34 +0000 Subject: [PATCH] Support plural for 'linkstoimage', 'redirectstofile' and 'duplicatesoffile' --- includes/ImagePage.php | 28 ++++++++++++++++------------ languages/messages/MessagesDe.php | 6 +++--- languages/messages/MessagesEn.php | 6 +++--- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 55e63baffe..ec1610fc96 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -630,7 +630,7 @@ EOT function imageLinks() { global $wgUser, $wgOut; - + $limit = 100; $dbr = wfGetDB( DB_SLAVE ); @@ -643,15 +643,17 @@ EOT array( 'LIMIT' => $limit + 1) ); - if ( 0 == $dbr->numRows( $res ) ) { + $count = $dbr->numRows( $res ); + if ( $count == 0 ) { $wgOut->addHTML( "
\n" ); $wgOut->addWikiMsg( 'nolinkstoimage' ); $wgOut->addHTML( "
\n" ); return; } - $wgOut->addHTML( "
\n" ); - $wgOut->addWikiMsg( 'linkstoimage' ); - $wgOut->addHTML( "