X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftitle%2FNamespaceImportTitleFactory.php;h=7a44d0a377145956b8654b5b4fd0f0849dc47848;hb=9c7f6734c397a954b8eaa5ec73876f2b4bf92afb;hp=0c1d0c40c783cb130d92d912339a7326e8ed723a;hpb=96a8ab6928b3e0be884c33eed8a1febf6fc4c31e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/title/NamespaceImportTitleFactory.php b/includes/title/NamespaceImportTitleFactory.php index 0c1d0c40c7..7a44d0a377 100644 --- a/includes/title/NamespaceImportTitleFactory.php +++ b/includes/title/NamespaceImportTitleFactory.php @@ -16,9 +16,10 @@ * http://www.gnu.org/copyleft/gpl.html * * @file - * @license GPL 2+ */ +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 @@ -32,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;