From a709ccc1ab076918e8c117f5706affddad1b72f9 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 4 Feb 2007 18:26:39 +0000 Subject: [PATCH] Use CSS wrapped rev-deleted-user instead of untargeted user contribs link for hidden user names. --- includes/PageHistory.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 8608a08a93..e04373bae0 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -206,7 +206,13 @@ class PageHistory { $s .= "($del) "; } - $s .= " $link $user"; + #getUser is safe, but this avoids making the invalid untargeted contribs links + if( $row->rev_deleted & Revision::DELETED_USER ) { + $user = '' . wfMsg('rev-deleted-user') . ''; + $s .= " $link $user"; + } else { + $s .= " $link $user"; + } if( $row->rev_minor_edit ) { $s .= ' ' . wfElement( 'span', array( 'class' => 'minor' ), wfMsg( 'minoreditletter') ); @@ -216,6 +222,7 @@ class PageHistory { if ($notificationtimestamp && ($row->rev_timestamp >= $notificationtimestamp)) { $s .= ' ' . wfMsgHtml( 'updatedmarker' ) . ''; } + #add blurb about having been deleted if( $row->rev_deleted & Revision::DELETED_TEXT ) { $s .= ' ' . wfMsgHtml( 'deletedrev' ); } -- 2.20.1