Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1057,6 +1057,7 @@ |
1058 | 1058 | 'filehist-comment', |
1059 | 1059 | 'imagelinks', |
1060 | 1060 | 'linkstoimage', |
| 1061 | + 'linkstoimage-more', |
1061 | 1062 | 'nolinkstoimage', |
1062 | 1063 | 'morelinkstoimage', |
1063 | 1064 | 'redirectstofile', |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -645,10 +645,16 @@ |
646 | 646 | $wgOut->addWikiMsg( 'nolinkstoimage' ); |
647 | 647 | $wgOut->addHTML( "</div>\n" ); |
648 | 648 | return; |
| 649 | + } elseif ( $count <= $limit - 1 ) { |
| 650 | + $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" ); |
| 651 | + $wgOut->addWikiMsg( 'linkstoimage', $count ); |
| 652 | + $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" ); |
| 653 | + } else { |
| 654 | + // More links than the limit. Add a link to [[Special:Whatlinkshere]] |
| 655 | + $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" ); |
| 656 | + $wgOut->addWikiMsg( 'linkstoimage-more', $limit, $this->mTitle->getPrefixedDBkey() ); |
| 657 | + $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" ); |
649 | 658 | } |
650 | | - $wgOut->addHTML( "<div id='mw-imagepage-section-linkstoimage'>\n" ); |
651 | | - $wgOut->addWikiMsg( 'linkstoimage', $count ); |
652 | | - $wgOut->addHTML( "<ul class='mw-imagepage-linktoimage'>\n" ); |
653 | 659 | |
654 | 660 | $sk = $wgUser->getSkin(); |
655 | 661 | $count = 0; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1762,6 +1762,9 @@ |
1763 | 1763 | 'filehist-comment' => 'Comment', |
1764 | 1764 | 'imagelinks' => 'Links', |
1765 | 1765 | 'linkstoimage' => 'The following {{PLURAL:$1|page links|$1 pages link}} to this file:', |
| 1766 | +'linkstoimage-more' => 'More than $1 {{PLURAL:$2|page links|pages link}} to this file. |
| 1767 | +The following list shows the {{PLURAL:$1|first page link|first $1 page links}} to this file only. |
| 1768 | +For a full list follow [[Special:Whatlinkshere/$2|this link]].', |
1766 | 1769 | 'nolinkstoimage' => 'There are no pages that link to this file.', |
1767 | 1770 | 'morelinkstoimage' => 'View [[Special:Whatlinkshere/$1|more links]] to this file.', |
1768 | 1771 | 'redirectstofile' => 'The following {{PLURAL:$1|file redirects|$1 files redirect}} to this file:', |