Merge "Setup: Move wgRCLinkDays logic from Setup to ChangesListSpecialPage"
[lhc/web/wiklou.git] / includes / actions / InfoAction.php
index 279c13b..7bcfc88 100644 (file)
@@ -280,7 +280,7 @@ class InfoAction extends FormlessAction {
                // Language in which the page content is (supposed to be) written
                $pageLang = $title->getPageLanguage()->getCode();
 
-               $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+               $permissionManager = $services->getPermissionManager();
 
                $pageLangHtml = $pageLang . ' - ' .
                        Language::fetchLanguageName( $pageLang, $lang->getCode() );
@@ -345,7 +345,7 @@ class InfoAction extends FormlessAction {
 
                $unwatchedPageThreshold = $config->get( 'UnwatchedPageThreshold' );
                if (
-                       $user->isAllowed( 'unwatchedpages' ) ||
+                       $services->getPermissionManager()->userHasRight( $user, 'unwatchedpages' ) ||
                        ( $unwatchedPageThreshold !== false &&
                                $pageCounts['watchers'] >= $unwatchedPageThreshold )
                ) {
@@ -360,7 +360,7 @@ class InfoAction extends FormlessAction {
                        ) {
                                $minToDisclose = $config->get( 'UnwatchedPageSecret' );
                                if ( $pageCounts['visitingWatchers'] > $minToDisclose ||
-                                       $user->isAllowed( 'unwatchedpages' ) ) {
+                                       $services->getPermissionManager()->userHasRight( $user, 'unwatchedpages' ) ) {
                                        $pageInfo['header-basic'][] = [
                                                $this->msg( 'pageinfo-visiting-watchers' ),
                                                $lang->formatNum( $pageCounts['visitingWatchers'] )