Sort out this ridiculous bug in Special:MovePage success message once and for all...
authorRob Church <robchurch@users.mediawiki.org>
Thu, 28 Jun 2007 18:12:25 +0000 (18:12 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Thu, 28 Jun 2007 18:12:25 +0000 (18:12 +0000)
RELEASE-NOTES
includes/SpecialMovepage.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index fb6b225..f92900e 100644 (file)
@@ -231,7 +231,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   security settings are cranked this way and AJAX-y gets used.
 * Delay AJAX watch initialization until click so IE 6 with ugly security
   settings doesn't prompt you until you use the link.
-
+* (bug 10399) Provide non-redirecting link to original title in Special:Movepage
 
 == API changes since 1.10 ==
 
index 1a22fbc..49c9197 100644 (file)
@@ -266,24 +266,26 @@ class MovePageForm {
        }
 
        function showSuccess() {
-               global $wgOut, $wgRequest, $wgRawHtml;
+               global $wgOut, $wgRequest, $wgUser, $wgRawHtml;
                
                $wgOut->setPagetitle( wfMsg( 'movepage' ) );
                $wgOut->setSubtitle( wfMsg( 'pagemovedsub' ) );
 
-               $oldText = wfEscapeWikiText( $wgRequest->getVal('oldtitle') );
-               $newText = wfEscapeWikiText( $wgRequest->getVal('newtitle') );
-               $talkmoved = $wgRequest->getVal('talkmoved');
+               $old = Title::newFromText( $wgRequest->getText( 'oldtitle' ) );
+               $new = Title::newFromText( $wgRequest->getText( 'newtitle' ) );
+               $talkmoved = $wgRequest->getVal( 'talkmoved' );
+               
+               $olink = $wgUser->getSkin()->makeKnownLinkObj( $old, '', 'redirect=no' );
+               $nlink = $wgUser->getSkin()->makeKnownLinkObj( $new );
 
-               $wgOut->addHtml( wfMsgExt( 'pagemovedtext', array( 'parse' ), $oldText, $newText ) );
+               $wgOut->addHtml( wfMsgExt( 'movepage-moved', array( 'parseinline', 'replaceafter' ), $olink, $nlink ) );
 
                if ( $talkmoved == 1 ) {
                        $wgOut->addWikiText( wfMsg( 'talkpagemoved' ) );
                } elseif( 'articleexists' == $talkmoved ) {
                        $wgOut->addWikiText( wfMsg( 'talkexists' ) );
                } else {
-                       $oldTitle = Title::newFromText( $oldText );
-                       if ( isset( $oldTitle ) && !$oldTitle->isTalkPage() && $talkmoved != 'notalkpage' ) {
+                       if( !$old->isTalkPage() && $talkmoved != 'notalkpage' ) {
                                $wgOut->addWikiText( wfMsg( 'talkpagenotmoved', wfMsg( $talkmoved ) ) );
                        }
                }
index 57864be..569391d 100644 (file)
@@ -2098,7 +2098,7 @@ to move a page.',
 'move-watch'              => 'Watch this page',
 'movepagebtn'             => 'Move page',
 'pagemovedsub'            => 'Move succeeded',
-'pagemovedtext'           => 'Page "[[$1]]" moved to "[[$2]]".',
+'movepage-moved' => "<big>'''\"$1\" has been moved to \"$2\"'''</big>",
 'articleexists'           => 'A page of that name already exists, or the
 name you have chosen is not valid.
 Please choose another name.',
index b9eb636..496b95e 100644 (file)
@@ -1373,7 +1373,7 @@ $wgMessageStructure = array(
                'move-watch',
                'movepagebtn',
                'pagemovedsub',
-               'pagemovedtext',
+               'movepage-moved',
                'articleexists',
                'talkexists',
                'movedto',