dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "libs: Declare dynamic properties and improve doc types"
[lhc/web/wiklou.git]
/
includes
/
title
/
SubpageImportTitleFactory.php
diff --git
a/includes/title/SubpageImportTitleFactory.php
b/includes/title/SubpageImportTitleFactory.php
index
4244350
..
415196a
100644
(file)
--- a/
includes/title/SubpageImportTitleFactory.php
+++ b/
includes/title/SubpageImportTitleFactory.php
@@
-18,6
+18,8
@@
* @file
*/
* @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 as subpages
/**
* 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
@@
-32,7
+34,10
@@
class SubpageImportTitleFactory implements ImportTitleFactory {
* created
*/
public function __construct( Title $rootPage ) {
* 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" );
}
throw new MWException( "The root page you specified, $rootPage, is in a " .
"namespace where subpages are not allowed" );
}