X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ftitle%2FNaiveImportTitleFactory.php;h=1a6ba72a809863035cf260846f9d0bcee1d3a392;hb=2e1ac38485b9c78890944413cba074474c06bd34;hp=4da939511c0fa80668acc5c72644aa64fe61fdf4;hpb=2be1e039d9b45b91389a3bfd863b9638109afb82;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/title/NaiveImportTitleFactory.php b/includes/title/NaiveImportTitleFactory.php index 4da939511c..1a6ba72a80 100644 --- a/includes/title/NaiveImportTitleFactory.php +++ b/includes/title/NaiveImportTitleFactory.php @@ -46,7 +46,10 @@ class NaiveImportTitleFactory implements ImportTitleFactory { // For built-in namespaces (0 <= ID < 100), we try to find a local NS with // the same namespace ID - if ( $foreignNs < 100 && MWNamespace::exists( $foreignNs ) ) { + if ( + $foreignNs < 100 && + MediaWikiServices::getInstance()->getNamespaceInfo()->exists( $foreignNs ) + ) { return Title::makeTitleSafe( $foreignNs, $foreignTitle->getText() ); } }