}
function showForm( $err, $hookErr = '' ) {
- global $wgOut, $wgUser, $wgContLang;
+ global $wgOut, $wgUser;
$ot = Title::newFromURL( $this->oldTitle );
if( is_null( $ot ) ) {
return;
}
- $start = $wgContLang->isRTL() ? 'right' : 'left';
- $end = $wgContLang->isRTL() ? 'left' : 'right';
$sk = $wgUser->getSkin();
$oldTitleLink = $sk->makeLinkObj( $ot );
$confirm = "
<tr>
<td></td>
- <td>" .
+ <td class='mw-input'>" .
Xml::checkLabel( wfMsg( 'delete_and_move_confirm' ), 'wpConfirm', 'wpConfirm' ) .
"</td>
</tr>";
$wgOut->addHTML( $errMsg );
}
- $moveTalkChecked = $this->moveTalk ? ' checked="checked"' : '';
-
$wgOut->addHTML(
Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', null, wfMsg( 'move-page-legend' ) ) .
Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-movepage-table' ) ) .
"<tr>
- <td align='$end'>" .
+ <td class='mw-label'>" .
wfMsgHtml( 'movearticle' ) .
"</td>
- <td align='$start'>
+ <td class='mw-input'>
<strong>{$oldTitleLink}</strong>
</td>
</tr>
<tr>
- <td align='$end'>" .
+ <td class='mw-label'>" .
Xml::label( wfMsg( 'newtitle' ), 'wpNewTitle' ) .
"</td>
- <td align='$start'>" .
+ <td class='mw-input'>" .
Xml::input( 'wpNewTitle', 40, $newTitle, array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
Xml::hidden( 'wpOldTitle', $oldTitle ) .
"</td>
</tr>
<tr>
- <td align='$end' valign='top'><br />" .
+ <td class='mw-label'>" .
Xml::label( wfMsg( 'movereason' ), 'wpReason' ) .
"</td>
- <td align='$start' valign='top'><br />" .
- Xml::openElement( 'textarea', array( 'name' => 'wpReason', 'id' => 'wpReason', 'cols' => 60, 'rows' => 2 ) ) .
- htmlspecialchars( $this->reason ) .
- Xml::closeElement( 'textarea' ) .
+ <td class='mw-input'>" .
+ Xml::tags( 'textarea', array( 'name' => 'wpReason', 'id' => 'wpReason', 'cols' => 60, 'rows' => 2 ), htmlspecialchars( $this->reason ) ) .
"</td>
</tr>"
);
$wgOut->addHTML( "
<tr>
<td></td>
- <td>" .
- Xml::checkLabel( wfMsg( 'movetalk' ), 'wpMovetalk', 'wpMovetalk', $moveTalkChecked ) .
+ <td class='mw-input'>" .
+ Xml::checkLabel( wfMsg( 'movetalk' ), 'wpMovetalk', 'wpMovetalk', $this->moveTalk ) .
"</td>
</tr>"
);
$wgOut->addHTML( "
<tr>
<td></td>
- <td>" .
+ <td class='mw-input'>" .
Xml::checkLabel( wfMsg( 'move-watch' ), 'wpWatch', 'watch', $watchChecked ) .
"</td>
</tr>
{$confirm}
<tr>
<td> </td>
- <td align='$start'>" .
+ <td class='mw-submit'>" .
Xml::submitButton( $movepagebtn, array( 'name' => $submitVar ) ) .
"</td>
</tr>" .
# Delete to make way if requested
if ( $wgUser->isAllowed( 'delete' ) && $this->deleteAndMove ) {
$article = new Article( $nt );
-
+
# Disallow deletions of big articles
$bigHistory = $article->isBigDeletion();
if( $bigHistory && !$nt->userCan( 'bigdelete' ) ) {
$this->showForm( array('delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ) );
return;
}
-
+
// This may output an error message and exit
$article->doDelete( wfMsgForContent( 'delete_and_move_reason' ) );
}
function showLogFragment( $title, &$out ) {
$out->addHTML( Xml::element( 'h2', NULL, LogPage::logName( 'move' ) ) );
- $request = new FauxRequest( array( 'page' => $title->getPrefixedText(), 'type' => 'move' ) );
- $viewer = new LogViewer( new LogReader( $request ) );
- $viewer->showList( $out );
+ LogEventsList::showLogExtract( $out, 'move', $title->getPrefixedText() );
}
}