* Fix for r24612 (!) spotted while fixing the above: parenthesis arround the bitwise check are needed since ! operator has higher precedence than &
) {
global $wgUser, $wgDisableAnonTalk, $wgLang;
$talkable = !( $wgDisableAnonTalk && 0 == $userId );
- $blockable = !$flags & self::TOOL_LINKS_NOBLOCK;
- $addEmailLink = $flags & self::TOOL_LINKS_EMAIL;
+ $blockable = !( $flags & self::TOOL_LINKS_NOBLOCK );
+ $addEmailLink = $flags & self::TOOL_LINKS_EMAIL && $userId;
$items = array();
if ( $talkable ) {