X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSiteStatsInit.php;h=e97db2db04fb64b5fb9225a0eb1b1dcf95da6d3b;hb=447574ceb746c2f4026a8bf77632bdc4604314bb;hp=8adb2181eaaa1e293a911e111f3a2399bbf1e5d2;hpb=f1d64e2fc641673c0b3c15a591b522f4ce813be9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SiteStatsInit.php b/includes/SiteStatsInit.php index 8adb2181ea..e97db2db04 100644 --- a/includes/SiteStatsInit.php +++ b/includes/SiteStatsInit.php @@ -68,15 +68,15 @@ class SiteStatsInit { * @return int */ public function articles() { - $config = MediaWikiServices::getInstance()->getMainConfig(); + $services = MediaWikiServices::getInstance(); $tables = [ 'page' ]; $conds = [ - 'page_namespace' => MWNamespace::getContentNamespaces(), + 'page_namespace' => $services->getNamespaceInfo()->getContentNamespaces(), 'page_is_redirect' => 0, ]; - if ( $config->get( 'ArticleCountMethod' ) == 'link' ) { + if ( $services->getMainConfig()->get( 'ArticleCountMethod' ) == 'link' ) { $tables[] = 'pagelinks'; $conds[] = 'pl_from=page_id'; }