From 49c06d3c7310e7be8337fe29923d6b8c02d58956 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 31 Dec 2007 21:09:43 +0000 Subject: [PATCH] * (bug 12446) Permissions check fix for undelete link Patch by Alexandre Emsenhuber - http://bugzilla.wikimedia.org/attachment.cgi?id=4483 --- RELEASE-NOTES | 1 + includes/Skin.php | 2 +- includes/SkinTemplate.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5e80096150..7d565c769f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -272,6 +272,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12416) Fix password setting for createAndPromote.php * (bug 3097) Inconsistently usable titles containing HTML character entities are now forbidden. A run of cleanupTitles.php will fix up existing pages. +* (bug 12446) Permissions check fix for undelete link == Parser changes in 1.12 == diff --git a/includes/Skin.php b/includes/Skin.php index 8ce261315d..9d00e1d68d 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -784,7 +784,7 @@ END; (($wgTitle->getArticleId() == 0) || ($action == "history")) && ($n = $wgTitle->isDeleted() ) ) { - if ( $wgUser->isAllowed( 'delete' ) ) { + if ( $wgUser->isAllowed( 'undelete' ) ) { $msg = 'thisisdeleted'; } else { $msg = 'viewdeleted'; diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index c0e2007454..09457ffc18 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -752,7 +752,7 @@ class SkinTemplate extends Skin { } } else { //article doesn't exist or is deleted - if( $wgUser->isAllowed( 'delete' ) ) { + if( $wgUser->isAllowed( 'deletedhistory' ) && $wgUser->isAllowed( 'undelete' ) ) { if( $n = $this->mTitle->isDeleted() ) { $undelTitle = SpecialPage::getTitleFor( 'Undelete' ); $content_actions['undelete'] = array( -- 2.20.1