Fix #1130 : special:movepage not showing actual title but encoded one.
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 20 Jan 2005 09:29:18 +0000 (09:29 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 20 Jan 2005 09:29:18 +0000 (09:29 +0000)
includes/SpecialMovepage.php

index b7e6e2b..c110f87 100644 (file)
@@ -53,21 +53,22 @@ class MovePageForm {
 
                $wgOut->setPagetitle( wfMsg( 'movepage' ) );
 
-               if ( $this->oldTitle == "" ) {
+               if ( $this->oldTitle == '' ) {
                        $wgOut->errorpage( 'notargettitle', 'notargettext' );
                        return;
                }
+
+               $ot = Title::newFromURL( $this->oldTitle );
+               $ott = $ot->getPrefixedText();
                
                $encOldTitle = htmlspecialchars( $this->oldTitle );
-               if( $this->newTitle == "" ) {
+               if( $this->newTitle == '' ) {
                        # Show the current title as a default
                        # when the form is first opened.
-                       $encNewTitle = $encOldTitle;
+                       $encNewTitle = $ott;
                } else {
                        $encNewTitle = htmlspecialchars( $this->newTitle );
                }
-               $ot = Title::newFromURL( $this->oldTitle );
-               $ott = $ot->getPrefixedText();
 
                $wgOut->addWikiText( wfMsg( 'movepagetext' ) );
                if ( ! Namespace::isTalk( $ot->getNamespace() ) ) {