r19765 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19764‎ | r19765 | r19766 >
Date:18:26, 4 February 2007
Author:aaron
Status:old
Tags:
Comment:
Use CSS wrapped rev-deleted-user instead of untargeted user contribs link for hidden user names.
Modified paths:
  • /trunk/phase3/includes/PageHistory.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/PageHistory.php
@@ -206,7 +206,13 @@
207207 $s .= "(<small>$del</small>) ";
208208 }
209209
210 - $s .= " $link <span class='history-user'>$user</span>";
 210+ #getUser is safe, but this avoids making the invalid untargeted contribs links
 211+ if( $row->rev_deleted & Revision::DELETED_USER ) {
 212+ $user = '<span class="history-deleted">' . wfMsg('rev-deleted-user') . '</span>';
 213+ $s .= " $link <span class='history-user'>$user</span>";
 214+ } else {
 215+ $s .= " $link <span class='history-user'>$user</span>";
 216+ }
211217
212218 if( $row->rev_minor_edit ) {
213219 $s .= ' ' . wfElement( 'span', array( 'class' => 'minor' ), wfMsg( 'minoreditletter') );
@@ -216,6 +222,7 @@
217223 if ($notificationtimestamp && ($row->rev_timestamp >= $notificationtimestamp)) {
218224 $s .= ' <span class="updatedmarker">' . wfMsgHtml( 'updatedmarker' ) . '</span>';
219225 }
 226+ #add blurb about having been deleted
220227 if( $row->rev_deleted & Revision::DELETED_TEXT ) {
221228 $s .= ' ' . wfMsgHtml( 'deletedrev' );
222229 }