Fix #5959: Anchors dropped from stub links
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 26 Apr 2007 20:27:21 +0000 (20:27 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 26 Apr 2007 20:27:21 +0000 (20:27 +0000)
Linker::makeStubLinkObj now load the style for stubs and call makeKnownLinkObj
this way known links and stub links will be consistent.

RELEASE-NOTES
includes/Linker.php

index 61f0a81..29c179d 100644 (file)
@@ -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 ==
index e769ec0..b12e2ad 100644 (file)
@@ -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 = "<a href=\"{$u}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}";
-               return $s;
+               return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style );
        }
 
        /**