mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-27 16:40:04 +00:00
Add grepability comments
Collapse one nested if Change-Id: I0d01239bc9ca3999688df2bb6d6360ccf563d956
This commit is contained in:
parent
66d656c6d7
commit
4cbdb4fbc2
|
@ -167,6 +167,9 @@ abstract class BaseBlacklist {
|
|||
if ( $title->inNamespace( NS_MEDIAWIKI ) ) {
|
||||
$sources = [];
|
||||
foreach ( self::$blacklistTypes as $type => $class ) {
|
||||
// For the built in types, this results in the use of:
|
||||
// spam-blacklist, spam-whitelist
|
||||
// email-blacklist, email-whitelist
|
||||
$type = ucfirst( $type );
|
||||
$sources[] = "$type-blacklist";
|
||||
$sources[] = "$type-whitelist";
|
||||
|
@ -190,11 +193,9 @@ abstract class BaseBlacklist {
|
|||
foreach ( $files as $fileName ) {
|
||||
$matches = [];
|
||||
if ( preg_match( '/^DB: (\w*) (.*)$/', $fileName, $matches ) ) {
|
||||
if ( $wgDBname === $matches[1] ) {
|
||||
if ( $matches[2] === $title->getPrefixedDbKey() ) {
|
||||
// Local DB fetch of this page...
|
||||
return true;
|
||||
}
|
||||
if ( $wgDBname === $matches[1] && $matches[2] === $title->getPrefixedDbKey() ) {
|
||||
// Local DB fetch of this page...
|
||||
return true;
|
||||
}
|
||||
} elseif ( preg_match( $thisHttpRegex, $fileName ) ) {
|
||||
// Raw view of this page
|
||||
|
|
Loading…
Reference in a new issue