From b42eea17f2fb25978663f32ae4eebc5007acf370 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Wed, 23 Apr 2008 16:42:01 +0000 Subject: [PATCH] Rollback link should not be hidden if the next revision is deleted, since it may revert to another, earlier revision (and the revision itself should not be checked, as it's the latest one). Moving check to the undo link. --- includes/PageHistory.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/PageHistory.php b/includes/PageHistory.php index bf018f227c..1002d7b574 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -264,9 +264,7 @@ class PageHistory { $tools = array(); - if ( !is_null( $next ) && is_object( $next ) && - !$rev->isDeleted( Revision::DELETED_TEXT ) && - !$next->rev_deleted & Revision::DELETED_TEXT ) { + if ( !is_null( $next ) && is_object( $next ) ) { if( !$this->mTitle->getUserPermissionsErrors( 'rollback', $wgUser ) && !$this->mTitle->getUserPermissionsErrors( 'edit', $wgUser ) && $latest ) { @@ -275,7 +273,9 @@ class PageHistory { . ''; } - if( $this->mTitle->quickUserCan( 'edit' ) ) { + if( $this->mTitle->quickUserCan( 'edit' ) && + !$rev->isDeleted( Revision::DELETED_TEXT ) && + !$next->rev_deleted & Revision::DELETED_TEXT ) { $undolink = $this->mSkin->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'editundo' ), -- 2.20.1