X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FInfoAction.php;h=207721e58333f1dfd4d05549206c9d0aadfb5c81;hb=5a451fd01be397db3209c1881a335423706da5c2;hp=279c13bd044db73c162b75d60a78053bfe0bb680;hpb=592c19692e8bd1218e9e58c89116566dccce0315;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 279c13bd04..207721e583 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -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'] ) @@ -743,8 +743,6 @@ class InfoAction extends FormlessAction { self::getCacheKey( $cache, $page->getTitle(), $page->getLatest() ), WANObjectCache::TTL_WEEK, function ( $oldValue, &$ttl, &$setOpts ) use ( $page, $config, $fname, $services ) { - global $wgActorTableSchemaMigrationStage; - $title = $page->getTitle(); $id = $title->getArticleID(); @@ -752,19 +750,11 @@ class InfoAction extends FormlessAction { $dbrWatchlist = wfGetDB( DB_REPLICA, 'watchlist' ); $setOpts += Database::getCacheSetOptions( $dbr, $dbrWatchlist ); - if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) { - $tables = [ 'revision_actor_temp' ]; - $field = 'revactor_actor'; - $pageField = 'revactor_page'; - $tsField = 'revactor_timestamp'; - $joins = []; - } else { - $tables = [ 'revision' ]; - $field = 'rev_user_text'; - $pageField = 'rev_page'; - $tsField = 'rev_timestamp'; - $joins = []; - } + $tables = [ 'revision_actor_temp' ]; + $field = 'revactor_actor'; + $pageField = 'revactor_page'; + $tsField = 'revactor_timestamp'; + $joins = []; $watchedItemStore = $services->getWatchedItemStore();