From ef7d038811d3c57d58b9c75e5add1d035a017c8f Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 26 Apr 2007 20:27:21 +0000 Subject: [PATCH] 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. --- RELEASE-NOTES | 1 + includes/Linker.php | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61f0a81880..29c179d54d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -355,6 +355,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 9669) Fix limit ordering for rebuildrecentchanges; broken since converted from 1.4 to 1.5 schema * (bug 9682) Revert PHP 5.1 dependency on warning suppression for SVN info +* (bug 5959) Anchors dropped from stub links == Maintenance == diff --git a/includes/Linker.php b/includes/Linker.php index e769ec0ffb..b12e2ad0ae 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -354,16 +354,8 @@ class Linker { * the end of the link. */ function makeStubLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { - $u = $nt->escapeLocalURL( $query ); - - if ( '' == $text ) { - $text = htmlspecialchars( $nt->getPrefixedText() ); - } $style = $this->getInternalLinkAttributesObj( $nt, $text, 'stub' ); - - list( $inside, $trail ) = Linker::splitTrail( $trail ); - $s = "{$prefix}{$text}{$inside}{$trail}"; - return $s; + return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style ); } /** -- 2.20.1