Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/21/2012 06:46:36 PM (13 years ago)
Author:
djpaul
Message:

When a part of an activity item matches WordPress' word blacklist, allow the activity
to be recorded to the database, but mark it as spam. Fixes #4284.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-filters.php

    r6095 r6127  
    150150
    151151    // Only check specific types of activity updates
    152     if ( !in_array( $activity->type, bp_activity_get_moderated_activity_types() ) )
     152    if ( ! in_array( $activity->type, bp_activity_get_moderated_activity_types() ) )
    153153        return;
    154154
    155     // Unset the activity component so activity stream update fails
    156     if ( !bp_core_check_for_blacklist( $activity->user_id, '', $activity->content ) )
    157         $activity->component = false;
     155    // Mark as spam
     156    if ( ! bp_core_check_for_blacklist( $activity->user_id, '', $activity->content ) )
     157        bp_activity_mark_as_spam( $activity, 'by_blacklist' );
    158158}
    159159
Note: See TracChangeset for help on using the changeset viewer.