X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FLinker.php;h=4a1aa872d8bc9b78ba5b3a9c694c245fb050df5c;hb=9074728fb9779b73bdfa851640c8e8b56b3fafaf;hp=a9c26c6451ac7c9b19942e543fd9633ba1e0371c;hpb=b15cd2ee45c5d1dbd58ea3df0becedc43a74ed94;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index a9c26c6451..4a1aa872d8 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1709,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 ) { @@ -1730,7 +1731,7 @@ class Linker { $lastLevel = $section['toclevel']; } $toc .= self::tocLineEnd(); - return self::tocList( $toc ); + return self::tocList( $toc, $lang ); } /** @@ -1752,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 . "";