From: Aaron Schulz Date: Mon, 5 Feb 2007 06:12:31 +0000 (+0000) Subject: *Enforce Hiderevision right better and some minor cleanup. X-Git-Tag: 1.31.0-rc.0~54126 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=7589ef97b036d31b1ae6a9c69771f6126f156ab4;p=lhc%2Fweb%2Fwiklou.git *Enforce Hiderevision right better and some minor cleanup. --- diff --git a/includes/PageHistory.php b/includes/PageHistory.php index e04373bae0..a2fbd56844 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -197,6 +197,9 @@ class PageHistory { if( $firstInList ) { // We don't currently handle well changing the top revision's settings $del = wfMsgHtml( 'rev-delundel' ); + } else if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { + // If revision was hidden from sysops + $del = wfMsgHtml( 'rev-delundel' ); } else { $del = $this->mSkin->makeKnownLinkObj( $revdel, wfMsg( 'rev-delundel' ), @@ -206,23 +209,28 @@ class PageHistory { $s .= "($del) "; } + $s .= " $link"; #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"; } + $s .= " $user"; if( $row->rev_minor_edit ) { $s .= ' ' . wfElement( 'span', array( 'class' => 'minor' ), wfMsg( 'minoreditletter') ); } - - $s .= $this->mSkin->revComment( $rev ); + #getComment is safe, but this is better formatted + if( $rev->isDeleted( Revision::DELETED_COMMENT ) ) { + $s .= " " . + wfMsgHtml( 'rev-deleted-comment' ) . ""; + } else { + $s .= $this->mSkin->commentBlock( $rev->getComment() ); + } + if ($notificationtimestamp && ($row->rev_timestamp >= $notificationtimestamp)) { $s .= ' ' . wfMsgHtml( 'updatedmarker' ) . ''; } - #add blurb about having been deleted + #add blurb about text having been deleted if( $row->rev_deleted & Revision::DELETED_TEXT ) { $s .= ' ' . wfMsgHtml( 'deletedrev' ); }