r21635 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21634‎ | r21635 | r21636 >
Date:20:27, 26 April 2007
Author:hashar
Status:old
Tags:
Comment:
Fix #5959: Anchors dropped from stub links
Linker::makeStubLinkObj now load the style for stubs and call makeKnownLinkObj
this way known links and stub links will be consistent.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -354,16 +354,8 @@
355355 * the end of the link.
356356 */
357357 function makeStubLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
358 - $u = $nt->escapeLocalURL( $query );
359 -
360 - if ( '' == $text ) {
361 - $text = htmlspecialchars( $nt->getPrefixedText() );
362 - }
363358 $style = $this->getInternalLinkAttributesObj( $nt, $text, 'stub' );
364 -
365 - list( $inside, $trail ) = Linker::splitTrail( $trail );
366 - $s = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}";
367 - return $s;
 359+ return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style );
368360 }
369361
370362 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -355,6 +355,7 @@
356356 * (bug 9669) Fix limit ordering for rebuildrecentchanges; broken since
357357 converted from 1.4 to 1.5 schema
358358 * (bug 9682) Revert PHP 5.1 dependency on warning suppression for SVN info
 359+* (bug 5959) Anchors dropped from stub links
359360
360361
361362 == Maintenance ==