From 3c47af57ec9ff411e3016585a6b5f45d0e5acda1 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 26 Mar 2007 23:08:07 +0000 Subject: [PATCH] (bug 9397) Introduce "sp-contributions-footer" and "sp-contributions-footer-anon" messages, shown at the end of Special:Contributions as appropriate for the target --- RELEASE-NOTES | 2 ++ includes/SpecialContributions.php | 15 +++++++++++++++ languages/messages/MessagesEn.php | 2 ++ maintenance/language/messages.inc | 2 ++ 4 files changed, 21 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e6ddbd6d02..fb676e87f2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -104,6 +104,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 4624) Namespace selection for Special:Whatlinkshere * Introduce PageHistoryBeforeList and PageHistoryLineEnding hooks; see docs/hooks.txt for more information +* (bug 9397) Introduce "sp-contributions-footer" and "sp-contributions-footer-anon" + messages, shown at the end of Special:Contributions as appropriate for the target == Bugfixes since 1.9 == * (bug 7292) Fix site statistics when moving pages in/out of content namespaces diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index 7dcb59d300..4151920a13 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -363,6 +363,21 @@ function wfSpecialContributions( $par = null ) { $wgOut->addHTML( "\n" ); $wgOut->addHTML( "

{$prevnextbits}

\n" ); + + # If there were contributions, and it was a valid user or IP, show + # the appropriate "footer" message - WHOIS tools, etc. + if( count( $contribs ) > 0 && $target != 'newbies' && $nt instanceof Title ) { + $message = IP::isIPAddress( $target ) + ? 'sp-contributions-footer-anon' + : 'sp-contributions-footer'; + $text = wfMsg( $message, $target ); + if( !wfEmptyMsg( $message, $text ) && $text != '-' ) { + $wgOut->addHtml( '' ); + } + } + } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 38cdff7d8d..43fbbccdda 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1892,6 +1892,8 @@ Consult the [[Special:Log/delete|deletion log]] for a record of recent deletions 'sp-contributions-search' => 'Search for contributions', 'sp-contributions-username' => 'IP Address or username:', 'sp-contributions-submit' => 'Search', +'sp-contributions-footer' => '-', +'sp-contributions-footer-anon' => '-', 'sp-newimages-showfrom' => 'Show new images starting from $1', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index f7e50006ed..c23f394850 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1221,6 +1221,8 @@ $wgMessageStructure = array( 'sp-contributions-search', 'sp-contributions-username', 'sp-contributions-submit', + 'sp-contributions-footer', + 'sp-contributions-footer-anon', ), 'newimages-showfrom' => array( 'sp-newimages-showfrom', -- 2.20.1