From: Rotem Liss Date: Wed, 23 Apr 2008 16:42:01 +0000 (+0000) Subject: Rollback link should not be hidden if the next revision is deleted, since it may... X-Git-Tag: 1.31.0-rc.0~48116 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=b42eea17f2fb25978663f32ae4eebc5007acf370;p=lhc%2Fweb%2Fwiklou.git 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. --- 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' ),