From 4b76b80dae1e508837a3a1c4545529272c20e814 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Tue, 28 Jun 2005 21:05:31 +0000 Subject: [PATCH] (bug 2562) Show rollback link for current revisions on diff pages --- RELEASE-NOTES | 1 + includes/DifferenceEngine.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9a954dd40b..53e3f01f43 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -406,6 +406,7 @@ Various bugfixes, small features, and a few experimental things: status between next/previous buttons. * Move MonoBook printable link from tab to sidebar * (bug 2567) Fix HTML escaping on category titles in list +* (bug 2562) Show rollback link for current revisions on diff pages === Caveats === diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index c6f58d2303..42df9675ad 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -152,7 +152,7 @@ CONTROL; 'target=' . urlencode($this->mOldUser) ); $newContribs = $sk->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Contributions' ), $contribs, 'target=' . urlencode($this->mNewUser) ); - if ( !$this->mNewid && $wgUser->isAllowed('rollback') ) { + if ( $this->newRev->isCurrent() && $wgUser->isAllowed('rollback') ) { $rollback = '   [' . $sk->makeKnownLinkObj( $wgTitle, wfMsg( 'rollbacklink' ), 'action=rollback&from=' . urlencode($this->mNewUser) . '&token=' . urlencode( $wgUser->editToken( array( $wgTitle->getPrefixedText(), $this->mNewUser ) ) ) ) . -- 2.20.1