Merge "Remove perf tracking code that was moved to WikimediaEvents in Ib300af5c"
[lhc/web/wiklou.git] / includes / skins / Skin.php
index eaee0d2..167b49d 100644 (file)
@@ -1057,10 +1057,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() ) === '';
        }
 
        /**
@@ -1095,7 +1095,7 @@ abstract class Skin extends ContextSource {
                $title = Title::newMainPage();
                self::checkTitle( $title, '' );
 
-               return $title->getLocalURL( $urlaction );
+               return $title->getLinkURL( $urlaction );
        }
 
        /**
@@ -1578,8 +1578,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();
                }