From: Brian Wolff Date: Fri, 24 Oct 2014 22:40:42 +0000 (-0300) Subject: Make "View/restore X deleted edits" check permissions per title X-Git-Tag: 1.31.0-rc.0~13483 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=c3747dadee854877baea8ab97e8c1a465a83f2d8;p=lhc%2Fweb%2Fwiklou.git Make "View/restore X deleted edits" check permissions per title This will ensure the prompt is shown for people who have viewdeletedfile from f7aac5ae. Change-Id: I6379413c8da01bcb878da8fbe77278bfc38529bc --- diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index c8c4ba466b..384aeda7bb 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -655,12 +655,12 @@ abstract class Skin extends ContextSource { function getUndeleteLink() { $action = $this->getRequest()->getVal( 'action', 'view' ); - if ( $this->getUser()->isAllowed( 'deletedhistory' ) && + if ( $this->getTitle()->userCan( 'deletedhistory', $this->getUser() ) && ( $this->getTitle()->getArticleID() == 0 || $action == 'history' ) ) { $n = $this->getTitle()->isDeleted(); if ( $n ) { - if ( $this->getUser()->isAllowed( 'undelete' ) ) { + if ( $this->getTitle()->userCan( 'undelete', $this->getUser() ) ) { $msg = 'thisisdeleted'; } else { $msg = 'viewdeleted';