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:
Aaron Schulz 2015-07-31 14:02:14 -07:00
parent 7a02693e9b
commit abb5df87d3

View file

@ -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;
}
}