mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-15 03:13:58 +00:00
Actually use clearCache() instead of copy-pasting key names
* Also follows up 7a02693e9b
due to key name changes
Change-Id: I8c15a6fa0f6b85016ee3a7882a0d40eb761897c7
This commit is contained in:
parent
7a02693e9b
commit
abb5df87d3
|
@ -233,16 +233,16 @@ class SpamBlacklistHooks {
|
|||
Status $status,
|
||||
$baseRevId
|
||||
) {
|
||||
if( !BaseBlacklist::isLocalSource( $wikiPage->getTitle() ) ) {
|
||||
if ( !BaseBlacklist::isLocalSource( $wikiPage->getTitle() ) ) {
|
||||
return true;
|
||||
}
|
||||
global $wgDBname;
|
||||
|
||||
$cache = ObjectCache::getMainWANInstance();
|
||||
// This sucks because every Blacklist needs to be cleared
|
||||
foreach ( BaseBlacklist::getBlacklistTypes() as $type => $class ) {
|
||||
$cache->delete( "$wgDBname:{$type}_blacklist_regexes" );
|
||||
$blacklist = BaseBlacklist::getInstance( $type );
|
||||
$blacklist->clearCache();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue