// Perform the deletion if appropriate
if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $token, $this->oldimage ) ) {
- $comment = $wgRequest->getText( 'wpComment' );
+ $comment = $wgRequest->getText( 'wpReason' );
if( $this->oldimage ) {
$status = $this->file->deleteOld( $this->oldimage, $comment );
if( $status->ok ) {
* Show the confirmation form
*/
private function showForm() {
- global $wgOut, $wgUser;
+ global $wgOut, $wgUser, $wgRequest;
$form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getAction() ) );
$form .= Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->oldimage ) );
$form .= '<fieldset><legend>' . wfMsgHtml( 'filedelete-legend' ) . '</legend>';
$form .= $this->prepareMessage( 'filedelete-intro' );
- $form .= '<p>' . Xml::inputLabel( wfMsg( 'filedelete-comment' ), 'wpComment', 'wpComment', 60 ) . '</p>';
+ $form .= '<p>' . Xml::inputLabel( wfMsg( 'filedelete-comment' ), 'wpReason', 'wpReason',
+ 60, $wgRequest->getText( 'wpReason' ) ) . '</p>';
$form .= '<p>' . Xml::submitButton( wfMsg( 'filedelete-submit' ) ) . '</p>';
$form .= '</fieldset>';
$form .= '</form>';