r25191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25190‎ | r25191 | r25192 >
Date:13:52, 27 August 2007
Author:robchurch
Status:old
Tags:
Comment:
(bug 11079) Use 'wpReason' as the comment field name and pre-fill the comment field from the request when building the form
Modified paths:
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/FileDeleteForm.php
@@ -63,7 +63,7 @@
6464
6565 // Perform the deletion if appropriate
6666 if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $token, $this->oldimage ) ) {
67 - $comment = $wgRequest->getText( 'wpComment' );
 67+ $comment = $wgRequest->getText( 'wpReason' );
6868 if( $this->oldimage ) {
6969 $status = $this->file->deleteOld( $this->oldimage, $comment );
7070 if( $status->ok ) {
@@ -98,14 +98,15 @@
9999 * Show the confirmation form
100100 */
101101 private function showForm() {
102 - global $wgOut, $wgUser;
 102+ global $wgOut, $wgUser, $wgRequest;
103103
104104 $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getAction() ) );
105105 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->oldimage ) );
106106 $form .= '<fieldset><legend>' . wfMsgHtml( 'filedelete-legend' ) . '</legend>';
107107 $form .= $this->prepareMessage( 'filedelete-intro' );
108108
109 - $form .= '<p>' . Xml::inputLabel( wfMsg( 'filedelete-comment' ), 'wpComment', 'wpComment', 60 ) . '</p>';
 109+ $form .= '<p>' . Xml::inputLabel( wfMsg( 'filedelete-comment' ), 'wpReason', 'wpReason',
 110+ 60, $wgRequest->getText( 'wpReason' ) ) . '</p>';
110111 $form .= '<p>' . Xml::submitButton( wfMsg( 'filedelete-submit' ) ) . '</p>';
111112 $form .= '</fieldset>';
112113 $form .= '</form>';

Follow-up revisions

RevisionCommit summaryAuthorDate
r25223Merged revisions 25126-25214 via svnmerge from...david07:39, 28 August 2007

Status & tagging log