X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FLinker.php;h=4a1aa872d8bc9b78ba5b3a9c694c245fb050df5c;hb=9c092814c7f275db78a6ed769aa76fdd87709c60;hp=5a05bd4721c4259504d8b7b92f7d28023bff884d;hpb=d2a6a73d297470c2ec1a9340fa833bad51751db5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index 5a05bd4721..4a1aa872d8 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1388,7 +1388,9 @@ class Linker { * * @return string */ - public static function formatLinksInComment( $comment, $title = null, $local = false, $wikiId = null ) { + public static function formatLinksInComment( + $comment, $title = null, $local = false, $wikiId = null + ) { return preg_replace_callback( '/ \[\[ @@ -1707,9 +1709,10 @@ class Linker { * Currently unused. * * @param array $tree Return value of ParserOutput::getSections() + * @param string|Language|bool $lang Language for the toc title, defaults to user language * @return string HTML fragment */ - public static function generateTOC( $tree ) { + public static function generateTOC( $tree, $lang = false ) { $toc = ''; $lastLevel = 0; foreach ( $tree as $section ) { @@ -1728,7 +1731,7 @@ class Linker { $lastLevel = $section['toclevel']; } $toc .= self::tocLineEnd(); - return self::tocList( $toc ); + return self::tocList( $toc, $lang ); } /** @@ -1750,17 +1753,6 @@ class Linker { $link, $legacyAnchor = false ) { $ret = " '#' . $anchor, - 'class' => 'mw-headline-anchor', - // Hide from screen readers, as it is inside a heading (the programs use headings to - // navigate, so the symbol is being read during navigation). Pending T13555 being fixed. - 'aria-hidden' => 'true', - 'title' => wfMessage( 'headline-anchor-title' )->text() - ), - wfMessage( 'section-symbol' )->text() - ) . "$html" . $link . "";