Revert r45340 "(bug 16793) text entered into the log entry should remain when an...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Jan 2009 04:34:01 +0000 (04:34 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Jan 2009 04:34:01 +0000 (04:34 +0000)
Incomplete & kinda broken:

This is conflicting between the two forms on the page when transwiki import is available:

   1. The transwiki form's comment field isn't filled out at all. Note this is the only one that most Wikipedia admins will see, since upload import is usually disabled...
   2. Both forms submit the comment field as 'log-comment' and store it into $this->logcomment, so if it were filled out the same way you'd get the text from whichever one you submitted put into both.

Only the form that actually got submitted and errored out should have its comment field prefilled.

includes/specials/SpecialImport.php

index d081214..5e1a653 100644 (file)
@@ -158,7 +158,7 @@ class SpecialImport extends SpecialPage {
                                                Xml::label( wfMsg( 'import-comment' ), 'mw-import-comment' ) .
                                        "</td>
                                        <td class='mw-input'>" .
-                                               Xml::input( 'log-comment', 50, $this->logcomment,
+                                               Xml::input( 'log-comment', 50, '',
                                                        array( 'id' => 'mw-import-comment', 'type' => 'text' ) ) . ' ' .
                                        "</td>
                                </tr>