r38534 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38533‎ | r38534 | r38535 >
Date:05:15, 4 August 2008
Author:brion
Status:old
Tags:
Comment:
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. :)
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -1345,7 +1345,7 @@
13461346 !! input
13471347 [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]]
13481348 !! result
1349 -<p><a href="https://www.mediawiki.org/wiki/Special:ThisNameWillHopefullyNeverBeUsed#anchor" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (not yet written)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
 1349+<p><a href="https://www.mediawiki.org/wiki/Special:ThisNameWillHopefullyNeverBeUsed" class="new" title="Special:ThisNameWillHopefullyNeverBeUsed (not yet written)">Special:ThisNameWillHopefullyNeverBeUsed#anchor</a>
13501350 </p>
13511351 !! end
13521352
Index: trunk/phase3/includes/Linker.php
@@ -522,11 +522,6 @@
523523 $q = 'action=edit&redlink=1&'.$query;
524524 }
525525 $u = $nt->escapeLocalURL( $q );
526 - if( $nt->getFragmentForURL() !== '' ) {
527 - # Might seem pointless to have a fragment on a redlink, but let's
528 - # be obedient.
529 - $u .= $nt->getFragmentForURL();
530 - }
531526
532527 $titleText = $nt->getPrefixedText();
533528 if ( '' == $text ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38400Fix the regression Brion noticed (not caused by me!) with special page links ...simetrical22:44, 1 August 2008
r38525Change test case added in r38400...brion03:00, 4 August 2008

Status & tagging log