From: Tim Starling Date: Sun, 1 Jul 2007 13:56:05 +0000 (+0000) Subject: Fixed unnecessary use of the replaceafter option to wfMsgExt(). Using it causes links... X-Git-Tag: 1.31.0-rc.0~52303 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=f71cd4d3dbad5d571ae6bd1e45c7a64319f0e7b2;p=lhc%2Fweb%2Fwiklou.git Fixed unnecessary use of the replaceafter option to wfMsgExt(). Using it causes links generated in wikitext from parameters to not work, due to conversion of $1 to %241. This does mean the success links are coloured like external links, but on the plus side, it means you can have things like "check [[Special:Whatlinkshere/$1|what links here]] and fix double redirects". Backwards compatibility with messages is retained. --- diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index ad4011efdf..555877bb48 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -274,22 +274,25 @@ class MovePageForm { $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 ); + $oldUrl = $old->getFullUrl( 'redirect=no' ); + $newUrl = $new->getFullURl(); + $oldText = $old->getPrefixedText(); + $newText = $new->getPrefixedText(); + $oldLink = "[$oldUrl $oldText]"; + $newLink = "[$newUrl $newText]"; - $wgOut->addHtml( wfMsgExt( 'movepage-moved', array( 'parseinline', 'replaceafter' ), - $olink, $nlink, $old->getPrefixedText(), $new->getPrefixedText() ) ); + $s = wfMsg( 'movepage-moved', $oldLink, $newLink, $oldText, $newText ); if ( $talkmoved == 1 ) { - $wgOut->addWikiText( wfMsg( 'talkpagemoved' ) ); + $s .= "\n\n" . wfMsg( 'talkpagemoved' ); } elseif( 'articleexists' == $talkmoved ) { - $wgOut->addWikiText( wfMsg( 'talkexists' ) ); + $s .= "\n\n" . wfMsg( 'talkexists' ); } else { if( !$old->isTalkPage() && $talkmoved != 'notalkpage' ) { - $wgOut->addWikiText( wfMsg( 'talkpagenotmoved', wfMsg( $talkmoved ) ) ); + $s .= "\n\n" . wfMsg( 'talkpagenotmoved', wfMsg( $talkmoved ) ); } } + $wgOut->addWikiText( $s ); } function showLogFragment( $title, &$out ) {