X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Ftitle%2FNamespaceImportTitleFactory.php;h=7a44d0a377145956b8654b5b4fd0f0849dc47848;hb=3ce997ed65303c4f35216e7e7abb02c4718d8239;hp=0c1d0c40c783cb130d92d912339a7326e8ed723a;hpb=a756c3b753e34a479da69a88a3176fd2d3e7cfa2;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;