X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Fimport%2FWikiImporter.php;h=00a7b52992cbaffd3eab9c027ebec2bd1ca46f9d;hb=65a7696952de8cf9f2ef0cca1e79b12f23813b06;hp=e5dacd70bc01b10e15bed3363a7ec5fa4360b00d;hpb=695d7c28fe7036e9988ce92908185ebc41238296;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php index e5dacd70bc..00a7b52992 100644 --- a/includes/import/WikiImporter.php +++ b/includes/import/WikiImporter.php @@ -24,6 +24,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * XML file reader for the page data importer. * @@ -286,11 +288,10 @@ class WikiImporter { $status->fatal( 'import-rootpage-invalid' ); } else { if ( !MWNamespace::hasSubpages( $title->getNamespace() ) ) { - global $wgContLang; - $displayNSText = $title->getNamespace() == NS_MAIN ? wfMessage( 'blanknamespace' )->text() - : $wgContLang->getNsText( $title->getNamespace() ); + : MediaWikiServices::getInstance()->getContentLanguage()-> + getNsText( $title->getNamespace() ); $status->fatal( 'import-rootpage-nosubpage', $displayNSText ); } else { // set namespace to 'all', so the namespace check in processTitle() can pass