Use type Language instead of string for $lang of doEditSectionLink
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 55d3462..60b7022 100644 (file)
@@ -220,7 +220,6 @@ abstract class Skin extends ContextSource {
                // Preload jquery.tablesorter for mediawiki.page.ready
                if ( strpos( $out->getHTML(), 'sortable' ) !== false ) {
                        $modules['content'][] = 'jquery.tablesorter';
-                       $modules['styles']['content'][] = 'jquery.tablesorter.styles';
                }
 
                // Preload jquery.makeCollapsible for mediawiki.page.ready
@@ -1613,14 +1612,15 @@ 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 string $lang Language code
+        * @param Language|null $lang Language object, defaults to user interface language
         * @return string HTML to use for edit link
         */
-       public function doEditSectionLink( Title $nt, $section, $tooltip = null, $lang = false ) {
+       public function doEditSectionLink( Title $nt, $section, $tooltip = null, Language $lang = null ) {
                // HTML generated here should probably have userlangattributes
                // added to it for LTR text on RTL pages
 
-               $lang = wfGetLangObj( $lang );
+               global $wgLang;
+               $lang = $lang ?: $wgLang;
 
                $attribs = [];
                if ( !is_null( $tooltip ) ) {