From: Alexandre Emsenhuber Date: Sun, 11 Sep 2011 08:14:46 +0000 (+0000) Subject: * Follow-up r96420: don't show e-mail links to anon users X-Git-Tag: 1.31.0-rc.0~27734 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=e3e5f0771f60b9ccfa8cf428df4b7d22d560359b;p=lhc%2Fweb%2Fwiklou.git * Follow-up r96420: don't show e-mail links to anon users * Fix for r24612 (!) spotted while fixing the above: parenthesis arround the bitwise check are needed since ! operator has higher precedence than & --- diff --git a/includes/Linker.php b/includes/Linker.php index 3297e976e4..837def2bbd 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -941,8 +941,8 @@ class Linker { ) { 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 ) {