Index: trunk/extensions/ContactPage/SpecialContact.php |
— | — | @@ -50,23 +50,10 @@ |
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
54 | | - // Blocked users cannot use the contact form. |
55 | | - if ( !$wgUser->isAllowed( 'sendemail' ) ) { |
56 | | - $wgOut->setPageTitle( wfMsg( 'blockedtitle' ) ); |
57 | | - $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
58 | | - $wgOut->setArticleRelated( false ); |
| 54 | + // Blocked users cannot use the contact form if they're disabled from sending email. |
| 55 | + if ( $wgUser->isBlockedFromEmailuser() ) { |
| 56 | + $wgOut->blockedPage(); |
59 | 57 | |
60 | | - $ip = wfGetIP(); |
61 | | - $blocker = User::whoIs( $wgUser->mBlock->mBy ); |
62 | | - $blockReason = $wgUser->mBlock->mReason; |
63 | | - |
64 | | - if ( strval( $blockReason ) === '' ) { |
65 | | - $blockReason = wfMsg( 'blockednoreason' ); |
66 | | - } |
67 | | - |
68 | | - $wgOut->addWikiMsg( 'blockedtext', $ip, $blockReason, $blocker ); |
69 | | - $wgOut->returnToMain( false ); |
70 | | - |
71 | 58 | return; |
72 | 59 | } |
73 | 60 | |