X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupCaps.php;h=da241e533769265b2912a4ea62a7e5dc152e0a13;hb=e6e932d9df9fcd2369822852c1453de2fc3d93be;hp=1b49f0e22113ba4a93ad4c9c72830ccf1243651a;hpb=4e021bb8d4741d5af0f02942fe3c33a19e7fabca;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupCaps.php b/maintenance/cleanupCaps.php index 1b49f0e221..da241e5337 100644 --- a/maintenance/cleanupCaps.php +++ b/maintenance/cleanupCaps.php @@ -55,7 +55,10 @@ class CleanupCaps extends TableCleanup { $this->namespace = intval( $this->getOption( 'namespace', 0 ) ); - if ( MWNamespace::isCapitalized( $this->namespace ) ) { + if ( + MediaWikiServices::getInstance()->getNamespaceInfo()-> + isCapitalized( $this->namespace ) + ) { $this->output( "Will be moving pages to first letter capitalized titles" ); $callback = 'processRowToUppercase'; } else { @@ -157,7 +160,8 @@ class CleanupCaps extends TableCleanup { $this->output( "\"$display\" -> \"$targetDisplay\": DRY RUN, NOT MOVED\n" ); $ok = 'OK'; } else { - $mp = new MovePage( $current, $target ); + $mp = MediaWikiServices::getInstance()->getMovePageFactory() + ->newMovePage( $current, $target ); $status = $mp->move( $this->user, $reason, $createRedirect ); $ok = $status->isOK() ? 'OK' : $status->getWikiText( false, false, 'en' ); $this->output( "\"$display\" -> \"$targetDisplay\": $ok\n" );