$out->addModules( 'mediawiki.misc-authed-ooui' );
$this->addHelpLink( 'Help:Moving a page' );
- $out->addWikiMsg( $this->getConfig()->get( 'FixDoubleRedirects' ) ?
- 'movepagetext' :
- 'movepagetext-noredirectfixer'
- );
+ $handlerSupportsRedirects = ContentHandler::getForTitle( $this->oldTitle )
+ ->supportsRedirects();
+
+ if ( $this->getConfig()->get( 'FixDoubleRedirects' ) ) {
+ $out->addWikiMsg( 'movepagetext' );
+ } else {
+ $out->addWikiMsg( $handlerSupportsRedirects ?
+ 'movepagetext-noredirectfixer' :
+ 'movepagetext-noredirectsupport' );
+ }
if ( $this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) {
$out->wrapWikiMsg(
}
}
- $handler = ContentHandler::getForTitle( $this->oldTitle );
-
$out->enableOOUI();
$fields = [];
}
if ( $user->isAllowed( 'suppressredirect' ) ) {
- if ( $handler->supportsRedirects() ) {
+ if ( $handlerSupportsRedirects ) {
$isChecked = $this->leaveRedirect;
$isDisabled = false;
} else {
'name' => 'wpMovesubpages',
'id' => 'wpMovesubpages',
'value' => '1',
- # Don't check the box if we only have talk subpages to
- # move and we aren't moving the talk page.
- 'selected' => $this->moveSubpages && ( $this->oldTitle->hasSubpages() || $this->moveTalk ),
+ 'selected' => true, // T222953 Always check the box
] ),
[
'label' => new OOUI\HtmlSnippet(