* Wraps the TOC in a table and provides the hide/collapse javascript.
*
* @param $toc String: html of the Table Of Contents
- * @param $lang mixed: Language code for the toc title
+ * @param $lang String|Language|false: Language for the toc title, defaults to user language
* @return String: full html of the TOC
*/
public static function tocList( $toc, $lang = false ) {
+ $lang = wfGetLangObj( $lang );
$title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
+
return
'<table id="toc" class="toc"><tr><td>'
. '<div id="toctitle"><h2>' . $title . "</h2></div>\n"
* @return String: HTML output
*/
public static function formatHiddenCategories( $hiddencats ) {
- global $wgLang;
wfProfileIn( __METHOD__ );
$outText = '';