X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=blobdiff_plain;f=includes%2Ftitle%2FNamespaceImportTitleFactory.php;h=7a44d0a377145956b8654b5b4fd0f0849dc47848;hb=dc1664763bda0652651494aa4bbf74b04914429a;hp=7c756aa18f8ccb33ed00cd8b6e0e70391ef3b3e3;hpb=8a4a8a8dcbaf454c9f64cd8b5ba90704d7721500;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;