r109681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109680‎ | r109681 | r109682 >
Date:15:05, 21 January 2012
Author:robin
Status:ok (Comments)
Tags:
Comment:
Follow-up r109455: make it clear that it's about e-mail *addresses*, also fix consistency: email -> e-mail and E-mail -> e-mail.
Modified paths:
  • /trunk/extensions/SpamBlacklist/EmailBlacklist.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklist.i18n.php (modified) (history)
  • /trunk/extensions/SpamBlacklist/SpamBlacklistHooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpamBlacklist/SpamBlacklistHooks.php
@@ -76,7 +76,7 @@
7777 }
7878
7979 /**
80 - * Processes new accounts for valid emails
 80+ * Processes new accounts for valid e-mail addresses
8181 *
8282 * @param $user User
8383 * @param $abortError
Index: trunk/extensions/SpamBlacklist/EmailBlacklist.php
@@ -15,7 +15,7 @@
1616 }
1717
1818 /**
19 - * Checks a User object for a blacklisted email
 19+ * Checks a User object for a blacklisted e-mail address
2020 *
2121 * @param User $user
2222 * @return bool True on valid email
@@ -32,9 +32,9 @@
3333 return true;
3434 }
3535
36 - // Check for whitelisted emails
 36+ // Check for whitelisted e-mail addresses
3737 if ( is_array( $whitelists ) ) {
38 - wfDebugLog( 'SpamBlacklist', "Excluding whitelisted emails from " . count( $whitelists ) .
 38+ wfDebugLog( 'SpamBlacklist', "Excluding whitelisted e-mail addresses from " . count( $whitelists ) .
3939 " regexes: " . implode( ', ', $whitelists ) . "\n" );
4040 foreach ( $whitelists as $regex ) {
4141 if ( preg_match( $regex, $email ) ) {
@@ -46,7 +46,7 @@
4747
4848
4949 # Do the match
50 - wfDebugLog( 'SpamBlacklist', "Checking email against " . count( $blacklists ) .
 50+ wfDebugLog( 'SpamBlacklist', "Checking e-mail address against " . count( $blacklists ) .
5151 " regexes: " . implode( ', ', $blacklists ) . "\n" );
5252 foreach ( $blacklists as $regex ) {
5353 if ( preg_match( $regex, $email ) ) {
Index: trunk/extensions/SpamBlacklist/SpamBlacklist.i18n.php
@@ -24,28 +24,28 @@
2525 # have been blocked by blacklist entries.
2626 #
2727 #</pre> <!-- leave this line exactly as it is -->',
28 - 'email-blacklist' => ' # Emails matching this list will be blocked from registering or sending email
 28+ 'email-blacklist' => ' # E-mail addresses matching this list will be blocked from registering or sending e-mails
2929 # This list affects only this wiki; refer also to the global blacklist.
3030 # For documentation see https://www.mediawiki.org/wiki/Extension:SpamBlacklist
3131 #<!-- leave this line exactly as it is --> <pre>
3232 #
3333 # Syntax is as follows:
3434 # * Everything from a "#" character to the end of the line is a comment
35 -# * Every non-blank line is a regex fragment which will only match hosts inside e-mails
 35+# * Every non-blank line is a regex fragment which will only match hosts inside e-mail addresses
3636
3737 #</pre> <!-- leave this line exactly as it is -->',
3838 'email-whitelist' => ' #<!-- leave this line exactly as it is --> <pre>
39 -# Emails matching this list will *not* be blocked even if they would
 39+# Email addresses matching this list will *not* be blocked even if they would
4040 # have been blocked by blacklist entries.
4141 #
4242 #</pre> <!-- leave this line exactly as it is -->
4343 # Syntax is as follows:
4444 # * Everything from a "#" character to the end of the line is a comment
45 -# * Every non-blank line is a regex fragment which will only match hosts inside e-mails',
 45+# * Every non-blank line is a regex fragment which will only match hosts inside e-mail addresses',
4646
47 - 'spam-blacklisted-email' => 'Blacklisted E-mail',
 47+ 'spam-blacklisted-email' => 'Blacklisted e-mail address',
4848 'spam-blacklisted-email-text' => 'Your e-mail address is currently blacklisted from sending e-mails to other users.',
49 - 'spam-blacklisted-email-signup' => 'The e-mail address given is currently blacklisted from use.',
 49+ 'spam-blacklisted-email-signup' => 'The given e-mail address is currently blacklisted from use.',
5050
5151 'spam-invalid-lines' => "The following spam blacklist {{PLURAL:$1|line is an|lines are}} invalid regular {{PLURAL:$1|expression|expressions}} and {{PLURAL:$1|needs|need}} to be corrected before saving the page:",
5252 'spam-blacklist-desc' => 'Regex-based anti-spam tool: [[MediaWiki:Spam-blacklist]] and [[MediaWiki:Spam-whitelist]]',

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109455Adding Email blacklisting to the SpamBlacklist extension...johnduhart23:29, 18 January 2012

Comments

#Comment by SPQRobin (talk | contribs)   15:09, 21 January 2012

(Also changed word order "e-mail address given" to "given e-mail address")

I fixed the qqq's on translatewiki (the text "[...] when trying to send an email with a blacklisted email" made it less clear :P)

Status & tagging log