Remove Skin::showIPinHeader(), deprecated since 1.27
[lhc/web/wiklou.git] / includes / skins / Skin.php
index f92a66f..bd43255 100644 (file)
@@ -767,15 +767,6 @@ abstract class Skin extends ContextSource {
                return $subpages;
        }
 
-       /**
-        * @deprecated since 1.27, feature removed
-        * @return bool Always false
-        */
-       function showIPinHeader() {
-               wfDeprecated( __METHOD__, '1.27' );
-               return false;
-       }
-
        /**
         * @return string
         */
@@ -911,7 +902,7 @@ abstract class Skin extends ContextSource {
                        $s = '';
                }
 
-               if ( wfGetLB()->getLaggedReplicaMode() ) {
+               if ( MediaWikiServices::getInstance()->getDBLoadBalancer()->getLaggedReplicaMode() ) {
                        $s .= ' <strong>' . $this->msg( 'laggedslavemode' )->parse() . '</strong>';
                }
 
@@ -1071,10 +1062,10 @@ abstract class Skin extends ContextSource {
                        $targetUser = User::newFromId( $id );
                }
 
-               # The sending user must have a confirmed email address and the target
-               # user must have a confirmed email address and allow emails from users.
-               return $this->getUser()->canSendEmail() &&
-                       $targetUser->canReceiveEmail();
+               # The sending user must have a confirmed email address and the receiving
+               # user must accept emails from the sender.
+               return $this->getUser()->canSendEmail()
+                       && SpecialEmailUser::validateTarget( $targetUser, $this->getUser() ) === '';
        }
 
        /**
@@ -1109,7 +1100,7 @@ abstract class Skin extends ContextSource {
                $title = Title::newMainPage();
                self::checkTitle( $title, '' );
 
-               return $title->getLocalURL( $urlaction );
+               return $title->getLinkURL( $urlaction );
        }
 
        /**
@@ -1265,11 +1256,10 @@ abstract class Skin extends ContextSource {
        function buildSidebar() {
                global $wgEnableSidebarCache, $wgSidebarCacheExpiry;
 
-               $that = $this;
-               $callback = function () use ( $that ) {
+               $callback = function () {
                        $bar = [];
-                       $that->addToSidebar( $bar, 'sidebar' );
-                       Hooks::run( 'SkinBuildSidebar', [ $that, &$bar ] );
+                       $this->addToSidebar( $bar, 'sidebar' );
+                       Hooks::run( 'SkinBuildSidebar', [ $this, &$bar ] );
 
                        return $bar;
                };
@@ -1593,8 +1583,6 @@ abstract class Skin extends ContextSource {
 
                $attribs = [];
                if ( !is_null( $tooltip ) ) {
-                       # T27462: undo double-escaping.
-                       $tooltip = Sanitizer::decodeCharReferences( $tooltip );
                        $attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
                                ->inLanguage( $lang )->text();
                }
@@ -1626,7 +1614,7 @@ abstract class Skin extends ContextSource {
 
                $result .= implode(
                        '<span class="mw-editsection-divider">'
-                               . wfMessage( 'pipe-separator' )->inLanguage( $lang )->text()
+                               . wfMessage( 'pipe-separator' )->inLanguage( $lang )->escaped()
                                . '</span>',
                        $linksHtml
                );