Fix for r55535, per Brion's comment: convert x-coded strings in the target input...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 11 Sep 2009 17:17:55 +0000 (17:17 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 11 Sep 2009 17:17:55 +0000 (17:17 +0000)
includes/specials/SpecialMovepage.php

index 0c92a8a..68ba065 100644 (file)
@@ -17,8 +17,10 @@ function wfSpecialMovepage( $par = null ) {
        }
 
        $target = isset( $par ) ? $par : $wgRequest->getVal( 'target' );
+
+       // Yes, the use of getVal() and getText() is wanted, see bug 20365
        $oldTitleText = $wgRequest->getVal( 'wpOldTitle', $target );
-       $newTitleText = $wgRequest->getVal( 'wpNewTitle' );
+       $newTitleText = $wgRequest->getText( 'wpNewTitle' );
 
        $oldTitle = Title::newFromText( $oldTitleText );
        $newTitle = Title::newFromText( $newTitleText );
@@ -87,7 +89,7 @@ class MovePageForm {
         *    OutputPage::wrapWikiMsg(). 
         */
        function showForm( $err ) {
-               global $wgOut, $wgUser, $wgFixDoubleRedirects;
+               global $wgOut, $wgUser, $wgContLang, $wgFixDoubleRedirects;
 
                $skin = $wgUser->getSkin();
 
@@ -200,7 +202,7 @@ class MovePageForm {
                                        Xml::label( wfMsg( 'newtitle' ), 'wpNewTitle' ) .
                                "</td>
                                <td class='mw-input'>" .
-                                       Xml::input( 'wpNewTitle', 40, $newTitle->getPrefixedText(), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
+                                       Xml::input( 'wpNewTitle', 40, $wgContLang->recodeForEdit( $newTitle->getPrefixedText() ), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
                                        Xml::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
                                "</td>
                        </tr>