X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=07964a4d5595619e5b748e4c7d83e29f20b1a815;hb=a8379682a46a428320c88702c800a6107c015137;hp=f92a66f2fe2073f76ade00211579b94d497dcbfc;hpb=a0947c9507065a83afe52b078f0f6d1c6163875e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index f92a66f2fe..07964a4d55 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1071,10 +1071,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 +1109,7 @@ abstract class Skin extends ContextSource { $title = Title::newMainPage(); self::checkTitle( $title, '' ); - return $title->getLocalURL( $urlaction ); + return $title->getLinkURL( $urlaction ); } /** @@ -1265,11 +1265,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 +1592,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 +1623,7 @@ abstract class Skin extends ContextSource { $result .= implode( '' - . wfMessage( 'pipe-separator' )->inLanguage( $lang )->text() + . wfMessage( 'pipe-separator' )->inLanguage( $lang )->escaped() . '', $linksHtml );