From: Brion Vibber Date: Mon, 4 Aug 2008 05:15:04 +0000 (+0000) Subject: Followup to r38525 (tweaks from r38400) -- don't put fragments on redlinks; they... X-Git-Tag: 1.31.0-rc.0~46153 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=778789dfd7f796e59a24669a1425067d242c9e5c;p=lhc%2Fweb%2Fwiklou.git Followup to r38525 (tweaks from r38400) -- don't put fragments on redlinks; they won't be useful on the edit UI, which isn't a page view. (I suppose it's dubious whether we should do the same to nonexitent special pages.... but fragments there wouldn't be too helpful either so no need for extra logic to add it back. :) --- diff --git a/includes/Linker.php b/includes/Linker.php index 4e4b5f504d..b913ebf10c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -522,11 +522,6 @@ class Linker { $q = 'action=edit&redlink=1&'.$query; } $u = $nt->escapeLocalURL( $q ); - if( $nt->getFragmentForURL() !== '' ) { - # Might seem pointless to have a fragment on a redlink, but let's - # be obedient. - $u .= $nt->getFragmentForURL(); - } $titleText = $nt->getPrefixedText(); if ( '' == $text ) { diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 0c36f575ed..46f12f469b 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -1345,7 +1345,7 @@ Nonexistent special page link with fragment !! input [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]] !! result -

Special:ThisNameWillHopefullyNeverBeUsed#anchor +

Special:ThisNameWillHopefullyNeverBeUsed#anchor

!! end