Merge "Add option to have private filters notify UDP/RC (default: disabled)"

This commit is contained in:
Hoo man 2012-12-16 16:10:52 +00:00 committed by Gerrit Code Review
commit c99f99a755
2 changed files with 4 additions and 2 deletions

View file

@ -898,7 +898,7 @@ class AbuseFilter {
$wgMemc->incr( self::filterMatchesKey() );
$local_log_ids = array();
global $wgAbuseFilterNotifications;
global $wgAbuseFilterNotifications, $wgAbuseFilterNotificationsPrivate;
foreach ( $log_rows as $index => $data ) {
$data['afl_var_dump'] = $var_dump;
$data['afl_id'] = $dbw->nextSequenceValue( 'abuse_filter_log_afl_id_seq' );
@ -924,7 +924,7 @@ class AbuseFilter {
'actions' => $data['afl_actions'],
'log' => $data['afl_id'],
) );
if ( self::filterHidden( $data['afl_filter'] ) ) {
if ( self::filterHidden( $data['afl_filter'] ) && !$wgAbuseFilterNotificationsPrivate ) {
continue;
}
$entry->publish( 0, $wgAbuseFilterNotifications );

View file

@ -167,6 +167,8 @@ $wgAbuseFilterRestrictedActions = array( 'block', 'degroup' );
// Abuse filter hit notification (available options: rc, udp, rcandudp)
$wgAbuseFilterNotifications = false;
// Enable notifications for private filters
$wgAbuseFilterNotificationsPrivate = false;
// Centralised filters
$wgAbuseFilterCentralDB = null;