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
build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git]
/
maintenance
/
cleanupCaps.php
diff --git
a/maintenance/cleanupCaps.php
b/maintenance/cleanupCaps.php
index
1b49f0e
..
2c81adf
100644
(file)
--- a/
maintenance/cleanupCaps.php
+++ b/
maintenance/cleanupCaps.php
@@
-55,7
+55,10
@@
class CleanupCaps extends TableCleanup {
$this->namespace = intval( $this->getOption( 'namespace', 0 ) );
$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 {
$this->output( "Will be moving pages to first letter capitalized titles" );
$callback = 'processRowToUppercase';
} else {
@@
-157,9
+160,10
@@
class CleanupCaps extends TableCleanup {
$this->output( "\"$display\" -> \"$targetDisplay\": DRY RUN, NOT MOVED\n" );
$ok = 'OK';
} else {
$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 );
$status = $mp->move( $this->user, $reason, $createRedirect );
- $ok = $status->isOK() ? 'OK' : $status->get
WikiText( false, false, 'en'
);
+ $ok = $status->isOK() ? 'OK' : $status->get
Message( false, false, 'en' )->text(
);
$this->output( "\"$display\" -> \"$targetDisplay\": $ok\n" );
}
$this->output( "\"$display\" -> \"$targetDisplay\": $ok\n" );
}