From 923f85f32890cb13b4cca72b1c109093b7c61037 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 7 Aug 2008 18:46:18 +0000 Subject: [PATCH] Add a more descriptive message to the links-to-image section for the case that more than 100 pages link to a file. Ths existing link to Whatlinkshere at the end of the list is easily be overseen if not scrolled to the bottom. Fixes the (cosmetic) bug that the list shows 101 entries instead of 100. Question: Should we make the hardcoded limit of 100 configurable via DefaultSettings? --- includes/ImagePage.php | 12 +++++++++--- languages/messages/MessagesEn.php | 3 +++ maintenance/language/messages.inc | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/includes/ImagePage.php b/includes/ImagePage.php index a526ba99e9..ae0c8c9e87 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -645,10 +645,16 @@ EOT $wgOut->addWikiMsg( 'nolinkstoimage' ); $wgOut->addHTML( "\n" ); return; + } elseif ( $count <= $limit - 1 ) { + $wgOut->addHTML( "
\n" ); + $wgOut->addWikiMsg( 'linkstoimage', $count ); + $wgOut->addHTML( "