Merge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git] / includes / title / NaiveImportTitleFactory.php
index 4da9395..1a6ba72 100644 (file)
@@ -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() );
                        }
                }