From: Siebrand Mazeland Date: Wed, 22 Aug 2012 19:29:18 +0000 (+0200) Subject: Follow up I66fb2d11: use wfGetLangObj() instead X-Git-Tag: 1.31.0-rc.0~22632 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=3ff6874d2ff72361b821abfe4e542dbbc227e71c;p=lhc%2Fweb%2Fwiklou.git Follow up I66fb2d11: use wfGetLangObj() instead Change-Id: I333021ee4edc7481b664986c27e12fbcac9d0d08 --- diff --git a/includes/Linker.php b/includes/Linker.php index 32a99cb15b..ce81d1c02e 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1594,11 +1594,9 @@ class Linker { * @return String: full html of the TOC */ public static function tocList( $toc, $lang = false ) { - $msg = wfMessage( 'toc' ); - if ( $lang !== false ) { - $msg = $msg->inLanguage( $lang ); - } - $title = $msg->escaped(); + $lang = wfGetLangObj( $lang ); + $title = wfMessage( 'toc' )->inLanguage( $lang )->escaped(); + return '
' . '

' . $title . "

\n"