From dd4f306ac7413b70dc7eefb1c325c7710d16da43 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Wed, 23 Apr 2008 16:23:13 +0000 Subject: [PATCH] Don't show rollback or undo buttons for deleted revisions or revivions whose next revision is deleted: the users are not allowed to execute these actions. --- includes/PageHistory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 8bed0732ef..bf018f227c 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -264,7 +264,9 @@ class PageHistory { $tools = array(); - if ( !is_null( $next ) && is_object( $next ) ) { + if ( !is_null( $next ) && is_object( $next ) && + !$rev->isDeleted( Revision::DELETED_TEXT ) && + !$next->rev_deleted & Revision::DELETED_TEXT ) { if( !$this->mTitle->getUserPermissionsErrors( 'rollback', $wgUser ) && !$this->mTitle->getUserPermissionsErrors( 'edit', $wgUser ) && $latest ) { -- 2.20.1