The intention for Linker::linkKnown() was to be used when the caller had
already preloaded the target's existence ('known') and called
Linker::getLinkColour() directly ('noclasses'). However, nearly all
usage of linkKnown() only did the first part, and not the latter.
So do what people actually ended up using the function for, and remove
'noclasses' from the default parameters. As long as the target the link
is being created for is already in LinkCache, this shouldn't cause any
extra database queries.
Change-Id: Ia5a4c2f18ec780627146617a1498bd04fcfbb3ee
$html = null,
$customAttribs = [],
$query = [],
- $options = [ 'known', 'noclasses' ]
+ $options = [ 'known' ]
) {
return Linker::linkKnown(
$target,
*/
public static function linkKnown(
$target, $html = null, $customAttribs = [],
- $query = [], $options = [ 'known', 'noclasses' ]
+ $query = [], $options = [ 'known' ]
) {
return self::link( $target, $html, $customAttribs, $query, $options );
}
!! wikitext
[[Image:Barfoo.jpg]]
!! html/php
-<p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
+<p><a href="/wiki/File:Barfoo.jpg" class="mw-redirect" title="File:Barfoo.jpg">File:Barfoo.jpg</a>
</p>
!! end