X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FnamespaceDupes.php;h=3c73306eb616efc64e9d882c3e06d8469ab79448;hb=ddd4e4dc0479bc5e90a5572516d67d7384bed05b;hp=075d6f27d602b36265ad7f82c19778d1651a19c0;hpb=b79bc0a2740b991525aae355ed216e0b9dc3aa86;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index 075d6f27d6..3c73306eb6 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -117,7 +117,10 @@ class NamespaceDupes extends Maintenance { } // Now pull in all canonical and alias namespaces... - foreach ( MWNamespace::getCanonicalNamespaces() as $ns => $name ) { + foreach ( + MediaWikiServices::getInstance()->getNamespaceInfo()->getCanonicalNamespaces() + as $ns => $name + ) { // This includes $wgExtraNamespaces if ( $name !== '' ) { $spaces[$name] = $ns; @@ -429,7 +432,10 @@ class NamespaceDupes extends Maintenance { * @return ResultWrapper */ private function getTargetList( $ns, $name, $options ) { - if ( $options['move-talk'] && MWNamespace::isSubject( $ns ) ) { + if ( + $options['move-talk'] && + MediaWikiServices::getInstance()->getNamespaceInfo()->isSubject( $ns ) + ) { $checkNamespaces = [ NS_MAIN, NS_TALK ]; } else { $checkNamespaces = NS_MAIN; @@ -465,9 +471,10 @@ class NamespaceDupes extends Maintenance { $dbk = "$name-" . $dbk; } $destNS = $ns; - if ( $sourceNs == NS_TALK && MWNamespace::isSubject( $ns ) ) { + $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo(); + if ( $sourceNs == NS_TALK && $nsInfo->isSubject( $ns ) ) { // This is an associated talk page moved with the --move-talk feature. - $destNS = MWNamespace::getTalk( $destNS ); + $destNS = $nsInfo->getTalk( $destNS ); } $newTitle = Title::makeTitleSafe( $destNS, $dbk ); if ( !$newTitle || !$newTitle->canExist() ) {