r52174 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52173‎ | r52174 | r52175 >
Date:19:29, 19 June 2009
Author:nikerabbit
Status:resolved (Comments)
Tags:
Comment:
* (bug 19294) Always show Sp-contributions-footer(-anon)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -96,19 +96,19 @@
9797 $pager = new ContribsPager( $target, $this->opts['namespace'], $this->opts['year'], $this->opts['month'] );
9898 if( !$pager->getNumRows() ) {
9999 $wgOut->addWikiMsg( 'nocontribs', $target );
100 - return;
 100+ } else {
 101+ # Show a message about slave lag, if applicable
 102+ if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
 103+ $wgOut->showLagWarning( $lag );
 104+
 105+ $wgOut->addHTML(
 106+ '<p>' . $pager->getNavigationBar() . '</p>' .
 107+ $pager->getBody() .
 108+ '<p>' . $pager->getNavigationBar() . '</p>'
 109+ );
101110 }
102111
103 - # Show a message about slave lag, if applicable
104 - if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
105 - $wgOut->showLagWarning( $lag );
106112
107 - $wgOut->addHTML(
108 - '<p>' . $pager->getNavigationBar() . '</p>' .
109 - $pager->getBody() .
110 - '<p>' . $pager->getNavigationBar() . '</p>'
111 - );
112 -
113113 # If there were contributions, and it was a valid user or IP, show
114114 # the appropriate "footer" message - WHOIS tools, etc.
115115 if( $target != 'newbies' ) {
@@ -117,9 +117,8 @@
118118
119119 $text = wfMsgNoTrans( $message, $target );
120120 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
121 - $wgOut->addHTML( '<div class="mw-contributions-footer">' );
122 - $wgOut->addWikiText( $text );
123 - $wgOut->addHTML( '</div>' );
 121+ $wgOut->wrapWikiMsg(
 122+ "<div class='mw-contributions-footer'>\n$1\n</div>", $message );
124123 }
125124 }
126125 }
Index: trunk/phase3/RELEASE-NOTES
@@ -195,6 +195,7 @@
196196 * Show user preference 'Use live preview' if $wgLivePreview is enabled only
197197 * (bug 17014) Blocked users can no longer use Special:UserRights if they do
198198 not have the 'userrights' permission.
 199+* (bug 19294) Always show Sp-contributions-footer(-anon)
199200
200201 == API changes in 1.16 ==
201202

Follow-up revisions

RevisionCommit summaryAuthorDate
r55578Fix for r52174 - don't show footer for non-existing usersnikerabbit18:36, 25 August 2009
r56468Fix regression in r52174 where parameter was not passed to MediaWiki:sp-contr...werdna00:32, 17 September 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   16:54, 25 August 2009

This shows sp-contributions-footer for nonexistent user account names, which doesn't seem terribly useful.

#Comment by Nikerabbit (talk | contribs)   17:09, 25 August 2009

Doesn't it depend on what customisations there are?

#Comment by Brion VIBBER (talk | contribs)   17:46, 25 August 2009

What customizations would possibly be useful in this case? Link to a user page that doesn't exist, lookups of... nothing? If it's desireable to show anything, a separate message for no-user might be good.

Status & tagging log