r74175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74174‎ | r74175 | r74176 >
Date:23:13, 2 October 2010
Author:siebrand
Status:resolved (Comments)
Tags:brion 
Comment:
Follow-up r71882 and r71929: Fix bug in r71929. Check should be reversed.
Modified paths:
  • /trunk/extensions/ContactPage/SpecialContact.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContactPage/SpecialContact.php
@@ -53,7 +53,7 @@
5454 }
5555
5656 // Blocked users cannot use the contact form.
57 - if ( $wgUser->isAllowed( 'sendemail' ) ) {
 57+ if ( !$wgUser->isAllowed( 'sendemail' ) ) {
5858 $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) );
5959 $wgOut->setRobotPolicy( 'noindex,nofollow' );
6060 $wgOut->setArticleRelated( false );

Follow-up revisions

RevisionCommit summaryAuthorDate
r80845ContactPage extension fixes:...brion08:00, 24 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r71882(bug 24391) Prevent use of Special:ContactPage for blocked users....siebrand12:31, 29 August 2010
r71929Only deny use of contact form if sending e-mail is blocked instead of blockin...siebrand06:57, 30 August 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   07:32, 24 January 2011

$user->isAllowed('sendemail') does not check whether a user has been blocked from sending email -- it simply checks whether their user groups confer the general right to send email.

A user who's been blocked with the no user email option still returns 'true' here; $user->isBlockedFromEmailuser() is needed for that check.

#Comment by Brion VIBBER (talk | contribs)   08:02, 24 January 2011

r80845 fixes this; marking resolved.

Status & tagging log