r60064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60063‎ | r60064 | r60065 >
Date:07:26, 15 December 2009
Author:mrzman
Status:ok
Tags:
Comment:
(bug 21814) Don't show broken user tool links when rolling back an edit that has a deleted username
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -3197,8 +3197,12 @@
31983198 $newId = $details['newid'];
31993199 $wgOut->setPageTitle( wfMsg( 'actioncomplete' ) );
32003200 $wgOut->setRobotPolicy( 'noindex,nofollow' );
3201 - $old = $wgUser->getSkin()->userLink( $current->getUser(), $current->getUserText() )
3202 - . $wgUser->getSkin()->userToolLinks( $current->getUser(), $current->getUserText() );
 3201+ if ( $current->getUserText() === '' ) {
 3202+ $old = wfMsg( 'rev-deleted-user' );
 3203+ } else {
 3204+ $old = $wgUser->getSkin()->userLink( $current->getUser(), $current->getUserText() )
 3205+ . $wgUser->getSkin()->userToolLinks( $current->getUser(), $current->getUserText() );
 3206+ }
32033207 $new = $wgUser->getSkin()->userLink( $target->getUser(), $target->getUserText() )
32043208 . $wgUser->getSkin()->userToolLinks( $target->getUser(), $target->getUserText() );
32053209 $wgOut->addHTML( wfMsgExt( 'rollback-success', array( 'parse', 'replaceafter' ), $old, $new ) );
Index: trunk/phase3/RELEASE-NOTES
@@ -681,6 +681,8 @@
682682 for namespace)
683683 * (bug 20765) Special:ListGroupRights no longer misses addables and removables
684684 groups if there are duplicate entries
 685+* (bug 21814) Message shown when rolling back an edit with a deleted username
 686+ now shows '(username deleted)' instead of broken user tool links
685687
686688 == API changes in 1.16 ==
687689

Status & tagging log