X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUndelete.php;h=05c622a71c6eebd324867088f35312e663417d6e;hb=48d355de818353e6ce4b05c024f43aab11824ed2;hp=51d6fd9b45ba9246dcc1805c16f16aa3da888bd6;hpb=751bac3786c561225f121b607189ccd865416e1b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 51d6fd9b45..05c622a71c 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -138,8 +138,10 @@ class SpecialUndelete extends SpecialPage { */ protected function isAllowed( $permission, User $user = null ) { $user = $user ?: $this->getUser(); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( $this->mTargetObj !== null ) { - return $this->mTargetObj->userCan( $permission, $user ); + return $permissionManager->userCan( $permission, $user, $this->mTargetObj ); } else { return $user->isAllowed( $permission ); } @@ -549,7 +551,6 @@ class SpecialUndelete extends SpecialPage { * * @param Revision $previousRev * @param Revision $currentRev - * @return string HTML */ function showDiff( $previousRev, $currentRev ) { $diffContext = clone $this->getContext(); @@ -688,7 +689,7 @@ class SpecialUndelete extends SpecialPage { $repo = RepoGroup::singleton()->getLocalRepo(); $path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key; - $repo->streamFile( $path ); + $repo->streamFileWithStatus( $path ); } protected function showHistory() {