(bug 9397) Introduce "sp-contributions-footer" and "sp-contributions-footer-anon...
authorRob Church <robchurch@users.mediawiki.org>
Mon, 26 Mar 2007 23:08:07 +0000 (23:08 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Mon, 26 Mar 2007 23:08:07 +0000 (23:08 +0000)
RELEASE-NOTES
includes/SpecialContributions.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index e6ddbd6..fb676e8 100644 (file)
@@ -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
index 7dcb59d..4151920 100644 (file)
@@ -363,6 +363,21 @@ function wfSpecialContributions( $par = null ) {
 
        $wgOut->addHTML( "</ul>\n" );
        $wgOut->addHTML( "<p>{$prevnextbits}</p>\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( '<div class="mw-contributions-footer">' );
+                       $wgOut->addWikiText( wfMsg( $message, $target ) );
+                       $wgOut->addHtml( '</div>' );
+               }
+       }
+       
 }
 
 /**
index 38cdff7..43fbbcc 100644 (file)
@@ -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',
 
index f7e5000..c23f394 100644 (file)
@@ -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',