From: Antoine Musso Date: Thu, 20 Jan 2005 09:29:18 +0000 (+0000) Subject: Fix #1130 : special:movepage not showing actual title but encoded one. X-Git-Tag: 1.5.0alpha1~880 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=9dd455446ccd586c69803d389520c1153912274d;p=lhc%2Fweb%2Fwiklou.git Fix #1130 : special:movepage not showing actual title but encoded one. --- 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() ) ) {