/**
* Constructor
*/
-function wfSpecialMovepage() {
+function wfSpecialMovepage( $par = null ) {
global $wgUser, $wgOut, $wgRequest, $action, $wgOnlySysopMayMove;
# check rights. We don't want newbies to move pages to prevents possible attack
return;
}
- $f = new MovePageForm();
+ $f = new MovePageForm( $par );
if ( 'success' == $action ) {
$f->showSuccess();
var $oldTitle, $newTitle, $reason; # Text input
var $moveTalk, $deleteAndMove;
- function MovePageForm() {
+ function MovePageForm( $par ) {
global $wgRequest;
- $this->oldTitle = $wgRequest->getText( 'wpOldTitle', $wgRequest->getVal( 'target' ) );
+ $target = isset($par) ? $par : $wgRequest->getVal( 'target' );
+ $this->oldTitle = $wgRequest->getText( 'wpOldTitle', $target );
$this->newTitle = $wgRequest->getText( 'wpNewTitle' );
$this->reason = $wgRequest->getText( 'wpReason' );
$this->moveTalk = $wgRequest->getBool( 'wpMovetalk', true );
<tr>
<td align='right'>{$movereason}:</td>
<td align='left'>
- <input type='text' size=40 name=\"wpReason\" value=\"{$encReason}\" />
+ <input type='text' size='40' name=\"wpReason\" value=\"{$encReason}\" />
</td>
</tr>" );
} else {
$talkmoved = $error;
}
+ } else {
+ # Stay silent on the subject of talk.
+ $talkmoved = '';
}
# Give back result to user.