X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FInfoAction.php;h=bfba59a02c7fbef60fb72110290d773bc40799c0;hb=d1044768f67a27227031dd43d0c8850bc465b413;hp=49a6bb5a5f6f6da1e7c0e7c8f30f2f7eee394ee8;hpb=9ef78ab4c18ccb352043b87f371cc0a642f0166c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 49a6bb5a5f..bfba59a02c 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -399,7 +399,7 @@ class InfoAction extends FormlessAction { } // Subpages of this page, if subpages are enabled for the current NS - if ( MWNamespace::hasSubpages( $title->getNamespace() ) ) { + if ( $services->getNamespaceInfo()->hasSubpages( $title->getNamespace() ) ) { $prefixIndex = SpecialPage::getTitleFor( 'Prefixindex', $title->getPrefixedText() . '/' ); $pageInfo['header-basic'][] = [ @@ -730,12 +730,13 @@ class InfoAction extends FormlessAction { protected function pageCounts( Page $page ) { $fname = __METHOD__; $config = $this->context->getConfig(); - $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); + $services = MediaWikiServices::getInstance(); + $cache = $services->getMainWANObjectCache(); return $cache->getWithSetCallback( self::getCacheKey( $cache, $page->getTitle(), $page->getLatest() ), WANObjectCache::TTL_WEEK, - function ( $oldValue, &$ttl, &$setOpts ) use ( $page, $config, $fname ) { + function ( $oldValue, &$ttl, &$setOpts ) use ( $page, $config, $fname, $services ) { global $wgActorTableSchemaMigrationStage; $title = $page->getTitle(); @@ -759,7 +760,7 @@ class InfoAction extends FormlessAction { $joins = []; } - $watchedItemStore = MediaWikiServices::getInstance()->getWatchedItemStore(); + $watchedItemStore = $services->getWatchedItemStore(); $result = []; $result['watchers'] = $watchedItemStore->countWatchers( $title ); @@ -824,7 +825,7 @@ class InfoAction extends FormlessAction { ); // Subpages (if enabled) - if ( MWNamespace::hasSubpages( $title->getNamespace() ) ) { + if ( $services->getNamespaceInfo()->hasSubpages( $title->getNamespace() ) ) { $conds = [ 'page_namespace' => $title->getNamespace() ]; $conds[] = 'page_title ' . $dbr->buildLike( $title->getDBkey() . '/', $dbr->anyString() );