r20720 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20719‎ | r20720 | r20721 >
Date:23:08, 26 March 2007
Author:robchurch
Status:old
Tags:
Comment:
(bug 9397) Introduce "sp-contributions-footer" and "sp-contributions-footer-anon" messages, shown at the end of Special:Contributions as appropriate for the target
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialContributions.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1221,6 +1221,8 @@
12221222 'sp-contributions-search',
12231223 'sp-contributions-username',
12241224 'sp-contributions-submit',
 1225+ 'sp-contributions-footer',
 1226+ 'sp-contributions-footer-anon',
12251227 ),
12261228 'newimages-showfrom' => array(
12271229 'sp-newimages-showfrom',
Index: trunk/phase3/includes/SpecialContributions.php
@@ -363,6 +363,21 @@
364364
365365 $wgOut->addHTML( "</ul>\n" );
366366 $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+
367382 }
368383
369384 /**
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1892,6 +1892,8 @@
18931893 'sp-contributions-search' => 'Search for contributions',
18941894 'sp-contributions-username' => 'IP Address or username:',
18951895 'sp-contributions-submit' => 'Search',
 1896+'sp-contributions-footer' => '-',
 1897+'sp-contributions-footer-anon' => '-',
18961898
18971899 'sp-newimages-showfrom' => 'Show new images starting from $1',
18981900
Index: trunk/phase3/RELEASE-NOTES
@@ -104,6 +104,8 @@
105105 * (bug 4624) Namespace selection for Special:Whatlinkshere
106106 * Introduce PageHistoryBeforeList and PageHistoryLineEnding hooks; see docs/hooks.txt
107107 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
108110
109111 == Bugfixes since 1.9 ==
110112 * (bug 7292) Fix site statistics when moving pages in/out of content namespaces

Follow-up revisions

RevisionCommit summaryAuthorDate
r21392reapply relevant part of r20720...raymond20:31, 19 April 2007