From 38cd3d3898a7ed8b41fc521a82ae12068f4d0f49 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 24 May 2010 14:05:24 +0000 Subject: [PATCH] (bug 23593) Made revision/date links enabled at history/contribs for deleted revs --- includes/HistoryPage.php | 7 +++++-- includes/specials/SpecialContributions.php | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/includes/HistoryPage.php b/includes/HistoryPage.php index e791af4c7a..1b7ad22c0c 100644 --- a/includes/HistoryPage.php +++ b/includes/HistoryPage.php @@ -590,7 +590,7 @@ class HistoryPager extends ReverseChronologicalPager { global $wgLang; $date = $wgLang->timeanddate( wfTimestamp(TS_MW, $rev->getTimestamp()), true ); $date = htmlspecialchars( $date ); - if( !$rev->isDeleted( Revision::DELETED_TEXT ) ) { + if ( $rev->userCan( Revision::DELETED_TEXT ) ) { $link = $this->getSkin()->link( $this->title, $date, @@ -599,7 +599,10 @@ class HistoryPager extends ReverseChronologicalPager { array( 'known', 'noclasses' ) ); } else { - $link = "$date"; + $link = $date; + } + if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) { + $link = "$link"; } return $link; } diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 3cb620becd..444fd32ff3 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -604,15 +604,18 @@ class ContribsPager extends ReverseChronologicalPager { $comment = $wgContLang->getDirMark() . $sk->revComment( $rev, false, true ); $date = $wgLang->timeanddate( wfTimestamp( TS_MW, $row->rev_timestamp ), true ); - if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { - $d = '' . $date . ''; - } else { + if( $rev->userCan( Revision::DELETED_TEXT ) ) { $d = $sk->linkKnown( $page, htmlspecialchars($date), array(), array( 'oldid' => intval( $row->rev_id ) ) ); + } else { + $d = $date; + } + if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { + $d = '' . $d . ''; } if( $this->target == 'newbies' ) { -- 2.20.1