X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=inline;f=includes%2Fspecials%2FSpecialWatchlist.php;h=84b3331d5c02901cfd87e8ae57288afe5a1ef884;hb=e19e6bfabcaf2b6aa5dd837ff7057bd6a25baef8;hp=2443470ef5f701142e959dd1ba77765eebc12621;hpb=6b2f7b1eb04503f0e69e3eef240321d41d87fac6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 2443470ef5..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,9 +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 ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { + } elseif ( !$permissionManager->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' ) ) { $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED; } else { $bitmask = 0;