From: Rotem Liss Date: Wed, 23 Apr 2008 16:23:13 +0000 (+0000) Subject: Don't show rollback or undo buttons for deleted revisions or revivions whose next... X-Git-Tag: 1.31.0-rc.0~48118 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=dd4f306ac7413b70dc7eefb1c325c7710d16da43;p=lhc%2Fweb%2Fwiklou.git 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. --- 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 ) {