* to be included in the link, like "§ion=$section"
* @param string $tooltip The tooltip to use for the link: will be escaped
* and wrapped in the 'editsectionhint' message
- * @param Language|null $lang Language object, defaults to user interface language
+ * @param string $lang Language code
* @return string HTML to use for edit link
*/
- public function doEditSectionLink( Title $nt, $section, $tooltip = null, Language $lang = null ) {
+ public function doEditSectionLink( Title $nt, $section, $tooltip = null, $lang = false ) {
// HTML generated here should probably have userlangattributes
// added to it for LTR text on RTL pages
- global $wgLang;
- $lang = $lang ?: $wgLang;
+ $lang = wfGetLangObj( $lang );
$attribs = [];
if ( !is_null( $tooltip ) ) {