Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1221,6 +1221,8 @@ |
1222 | 1222 | 'sp-contributions-search', |
1223 | 1223 | 'sp-contributions-username', |
1224 | 1224 | 'sp-contributions-submit', |
| 1225 | + 'sp-contributions-footer', |
| 1226 | + 'sp-contributions-footer-anon', |
1225 | 1227 | ), |
1226 | 1228 | 'newimages-showfrom' => array( |
1227 | 1229 | 'sp-newimages-showfrom', |
Index: trunk/phase3/includes/SpecialContributions.php |
— | — | @@ -363,6 +363,21 @@ |
364 | 364 | |
365 | 365 | $wgOut->addHTML( "</ul>\n" ); |
366 | 366 | $wgOut->addHTML( "<p>{$prevnextbits}</p>\n" ); |
| 367 | + |
| 368 | + # If there were contributions, and it was a valid user or IP, show |
| 369 | + # the appropriate "footer" message - WHOIS tools, etc. |
| 370 | + if( count( $contribs ) > 0 && $target != 'newbies' && $nt instanceof Title ) { |
| 371 | + $message = IP::isIPAddress( $target ) |
| 372 | + ? 'sp-contributions-footer-anon' |
| 373 | + : 'sp-contributions-footer'; |
| 374 | + $text = wfMsg( $message, $target ); |
| 375 | + if( !wfEmptyMsg( $message, $text ) && $text != '-' ) { |
| 376 | + $wgOut->addHtml( '<div class="mw-contributions-footer">' ); |
| 377 | + $wgOut->addWikiText( wfMsg( $message, $target ) ); |
| 378 | + $wgOut->addHtml( '</div>' ); |
| 379 | + } |
| 380 | + } |
| 381 | + |
367 | 382 | } |
368 | 383 | |
369 | 384 | /** |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1892,6 +1892,8 @@ |
1893 | 1893 | 'sp-contributions-search' => 'Search for contributions', |
1894 | 1894 | 'sp-contributions-username' => 'IP Address or username:', |
1895 | 1895 | 'sp-contributions-submit' => 'Search', |
| 1896 | +'sp-contributions-footer' => '-', |
| 1897 | +'sp-contributions-footer-anon' => '-', |
1896 | 1898 | |
1897 | 1899 | 'sp-newimages-showfrom' => 'Show new images starting from $1', |
1898 | 1900 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -104,6 +104,8 @@ |
105 | 105 | * (bug 4624) Namespace selection for Special:Whatlinkshere |
106 | 106 | * Introduce PageHistoryBeforeList and PageHistoryLineEnding hooks; see docs/hooks.txt |
107 | 107 | for more information |
| 108 | +* (bug 9397) Introduce "sp-contributions-footer" and "sp-contributions-footer-anon" |
| 109 | + messages, shown at the end of Special:Contributions as appropriate for the target |
108 | 110 | |
109 | 111 | == Bugfixes since 1.9 == |
110 | 112 | * (bug 7292) Fix site statistics when moving pages in/out of content namespaces |