X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftitle%2FNamespaceImportTitleFactory.php;h=7a44d0a377145956b8654b5b4fd0f0849dc47848;hb=3bf40e4021fbe1087ab275767d5cf367b4a32f02;hp=7c756aa18f8ccb33ed00cd8b6e0e70391ef3b3e3;hpb=e69bcfad17d67da5113cdd75276a5f7b5cefb123;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/title/NamespaceImportTitleFactory.php b/includes/title/NamespaceImportTitleFactory.php index 7c756aa18f..7a44d0a377 100644 --- a/includes/title/NamespaceImportTitleFactory.php +++ b/includes/title/NamespaceImportTitleFactory.php @@ -18,6 +18,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * A class to convert page titles on a foreign wiki (ForeignTitle objects) into * page titles on the local wiki (Title objects), placing all pages in a fixed @@ -31,7 +33,7 @@ class NamespaceImportTitleFactory implements ImportTitleFactory { * @param int $ns The namespace to use for all pages */ public function __construct( $ns ) { - if ( !MWNamespace::exists( $ns ) ) { + if ( !MediaWikiServices::getInstance()->getNamespaceInfo()->exists( $ns ) ) { throw new MWException( "Namespace $ns doesn't exist on this wiki" ); } $this->ns = $ns;