Merge "Add isCurrentWikiId()/isCurrentWikiDomain()/getCurrentWikiDomain() to WikiMap"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index 901676a..91d2a7e 100644 (file)
@@ -342,10 +342,7 @@ abstract class Skin extends ContextSource {
         * @return Title
         */
        public function getRelevantTitle() {
-               if ( isset( $this->mRelevantTitle ) ) {
-                       return $this->mRelevantTitle;
-               }
-               return $this->getTitle();
+               return $this->mRelevantTitle ?? $this->getTitle();
        }
 
        /**
@@ -1610,21 +1607,14 @@ abstract class Skin extends ContextSource {
         * @param string $section The designation of the section being pointed to,
         *   to be included in the link, like "&section=$section"
         * @param string|null $tooltip The tooltip to use for the link: will be escaped
-        *   and wrapped in the 'editsectionhint' message.
-        *   Not setting this parameter is deprecated.
-        * @param Language|string $lang Language object or language code string.
-        *   Type string is deprecated. Not setting this parameter is deprecated.
+        *   and wrapped in the 'editsectionhint' message
+        * @param Language $lang Language object
         * @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, Language $lang ) {
                // HTML generated here should probably have userlangattributes
                // added to it for LTR text on RTL pages
 
-               if ( !$lang instanceof Language ) {
-                       wfDeprecated( __METHOD__ . ' with other type than Language for $lang', '1.32' );
-                       $lang = wfGetLangObj( $lang );
-               }
-
                $attribs = [];
                if ( !is_null( $tooltip ) ) {
                        $attribs['title'] = $this->msg( 'editsectionhint' )->rawParams( $tooltip )