$wgOut->addWikiMsg( 'nolinkstoimage' );
$wgOut->addHTML( "</div>\n" );
return;
+ } elseif ( $count <= $limit - 1 ) {
+ $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" );
+ $wgOut->addWikiMsg( 'linkstoimage', $count );
+ $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" );
+ } else {
+ // More links than the limit. Add a link to [[Special:Whatlinkshere]]
+ $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" );
+ $wgOut->addWikiMsg( 'linkstoimage-more', $limit, $this->mTitle->getPrefixedDBkey() );
+ $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" );
}
- $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" );
- $wgOut->addWikiMsg( 'linkstoimage', $count );
- $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" );
$sk = $wgUser->getSkin();
$count = 0;
'filehist-comment' => 'Comment',
'imagelinks' => 'Links',
'linkstoimage' => 'The following {{PLURAL:$1|page links|$1 pages link}} to this file:',
+'linkstoimage-more' => 'More than $1 {{PLURAL:$2|page links|pages link}} to this file.
+The following list shows the {{PLURAL:$1|first page link|first $1 page links}} to this file only.
+For a full list follow [[Special:Whatlinkshere/$2|this link]].',
'nolinkstoimage' => 'There are no pages that link to this file.',
'morelinkstoimage' => 'View [[Special:Whatlinkshere/$1|more links]] to this file.',
'redirectstofile' => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:',