X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=84b3331d5c02901cfd87e8ae57288afe5a1ef884;hb=4fe1735ba32b11ab9115f36511508885045ebdb2;hp=f5239b471365e3dc59d46a0a6c75e3b23ec143b2;hpb=4858f8afdabb2a1d7c60b7c14b6f4d398056c07e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index f5239b4713..84b3331d5c 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -148,6 +148,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { /** * @inheritDoc + * @suppress PhanUndeclaredMethod */ protected function registerFilters() { parent::registerFilters(); @@ -380,12 +381,10 @@ class SpecialWatchlist extends ChangesListSpecialPage { // Log entries with DELETED_ACTION must not show up unless the user has // the necessary rights. - if ( !$user->isAllowed( 'deletedhistory' ) ) { + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); + if ( !$permissionManager->userHasRight( $user, 'deletedhistory' ) ) { $bitmask = LogPage::DELETED_ACTION; - } elseif ( !MediaWikiServices::getInstance() - ->getPermissionManager() - ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) - ) { + } elseif ( !$permissionManager->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) ) { $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED; } else { $bitmask = 0;