From 9dd455446ccd586c69803d389520c1153912274d Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 20 Jan 2005 09:29:18 +0000 Subject: [PATCH] Fix #1130 : special:movepage not showing actual title but encoded one. --- includes/SpecialMovepage.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index b7e6e2b9c2..c110f87f14 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -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() ) ) { -- 2.20.1