X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftitle%2FSubpageImportTitleFactory.php;h=415196a5ef271408b3ffe58d493f47338fd12b6e;hb=7baed424895d4fe38aa8a7215384724685eca88f;hp=b0be7afaa1b7adc7802ba69a393e8c6c7a7000a1;hpb=b7ec2c9b3353b99fe30e1e202c8625cac2f541f3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/title/SubpageImportTitleFactory.php b/includes/title/SubpageImportTitleFactory.php index b0be7afaa1..415196a5ef 100644 --- a/includes/title/SubpageImportTitleFactory.php +++ b/includes/title/SubpageImportTitleFactory.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 as subpages @@ -33,7 +34,10 @@ class SubpageImportTitleFactory implements ImportTitleFactory { * created */ public function __construct( Title $rootPage ) { - if ( !MWNamespace::hasSubpages( $rootPage->getNamespace() ) ) { + if ( + !MediaWikiServices::getInstance()->getNamespaceInfo()-> + hasSubpages( $rootPage->getNamespace() ) + ) { throw new MWException( "The root page you specified, $rootPage, is in a " . "namespace where subpages are not allowed" ); }