$this->newTitle = $wgRequest->getText( 'wpNewTitle' );
$this->reason = $wgRequest->getText( 'wpReason' );
$this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true );
- $this->deleteAndMove = $wgRequest->getBool( 'wpDeleteAndMove' );
+ $this->deleteAndMove = $wgRequest->getBool( 'wpDeleteAndMove' ) && $wgRequest->getBool( 'wpConfirm' );
}
function showForm( $err ) {
if ( $err == 'articleexists' && $wgUser->isAllowed( 'delete' ) ) {
$wgOut->addWikiText( wfMsg( 'delete_and_move_text', $encNewTitle ) );
$movepagebtn = wfMsgHtml( 'delete_and_move' );
+ $confirmText = wfMsgHtml( 'delete_and_move_confirm' );
$submitVar = 'wpDeleteAndMove';
+ $confirm = "
+ <tr>
+ <td align='right'>
+ <input type='checkbox' name='wpConfirm' id='wpConfirm' value=\"true\" />
+ </td>
+ <td align='left'><label for='wpConfirm'>{$confirmText}</label></td>
+ </tr>";
$err = '';
} else {
$wgOut->addWikiText( wfMsg( 'movepagetext' ) );
$movepagebtn = wfMsgHtml( 'movepagebtn' );
$submitVar = 'wpMove';
+ $confirm = false;
}
if ( !$ot->isTalkPage() ) {
</tr>" );
}
$wgOut->addHTML( "
+ {$confirm}
<tr>
<td> </td>
<td align='left'>
'==Deletion required==
The destination article "[[$1]]" already exists. Do you want to delete it to make way for the move?',
+'delete_and_move_confirm' => 'Yes, delete the page',
'delete_and_move_reason' => 'Deleted to make way for move',
'selfmove' => "Source and destination titles are the same; can't move a page over itself.",
'immobile_namespace' => "Destination title is of a special type; cannot move pages into that namespace.",