Revert "Use type Language instead of string for $lang of doEditSectionLink"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 60b7022..8384ca0 100644 (file)
@@ -1612,15 +1612,14 @@ abstract class Skin extends ContextSource {
         *   to be included in the link, like "&section=$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 ) ) {