Go to the documentation of this file.
14 throw new LogicException( __CLASS__ .
' cannot be used to filter links.' );
39 if ( !count( $blacklists ) ) {
45 if ( is_array( $whitelists ) ) {
46 wfDebugLog(
'SpamBlacklist',
"Excluding whitelisted email addresses from " .
47 count( $whitelists ) .
" regexes: " . implode(
', ', $whitelists ) .
"\n" );
48 foreach ( $whitelists as $regex ) {
49 if ( preg_match( $regex, $email ) ) {
57 wfDebugLog(
'SpamBlacklist',
"Checking e-mail address against " . count( $blacklists ) .
58 " regexes: " . implode(
', ', $blacklists ) .
"\n" );
59 foreach ( $blacklists as $regex ) {
60 if ( preg_match( $regex, $email ) ) {
filter(array $links, Title $title, $preventLog=false)
getBlacklists()
Fetch local and (possibly cached) remote blacklists.
getBlacklistType()
Returns the code for the blacklist implementation.
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
getEmail()
Get the user's e-mail address.
checkUser(User $user)
Checks a User object for a blacklisted email address.
Base class for different kinds of blacklists.
Represents a title within MediaWiki.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
getWhitelists()
Returns the (local) whitelist.