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 ==
}
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 ) ) );
}
}
'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.',