Changeset 6591
- Timestamp:
- 12/10/2012 10:25:25 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r6574 r6591 500 500 501 501 // Don't retrieve activity comments marked as spam 502 if ( 'ham_only' == $spam ) 502 if ( 'ham_only' == $spam ) { 503 503 $spam_sql = 'AND a.is_spam = 0'; 504 elseif ( 'spam_only' == $spam )504 } elseif ( 'spam_only' == $spam ) { 505 505 $spam_sql = 'AND a.is_spam = 1'; 506 else506 } else { 507 507 $spam_sql = ''; 508 } 508 509 509 510 // The mptt BETWEEN clause allows us to limit returned descendants to the right part of the tree 510 $sql = apply_filters( 'bp_activity_comments_user_join_filter', $wpdb->prepare( "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name{$fullname_select} FROM {$bp->activity->table_name} a, {$wpdb->users} u{$fullname_from} WHERE u.ID = a.user_id {$fullname_where} AND a.type = 'activity_comment' ${spam_sql} AND a.item_id = %d AND a.mptt_left BETWEEN %d AND%d ORDER BY a.date_recorded ASC", $top_level_parent_id, $left, $right ), $activity_id, $left, $right, $spam_sql );511 $sql = apply_filters( 'bp_activity_comments_user_join_filter', $wpdb->prepare( "SELECT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name{$fullname_select} FROM {$bp->activity->table_name} a, {$wpdb->users} u{$fullname_from} WHERE u.ID = a.user_id {$fullname_where} AND a.type = 'activity_comment' {$spam_sql} AND a.item_id = %d AND a.mptt_left > %d AND a.mptt_left < %d ORDER BY a.date_recorded ASC", $top_level_parent_id, $left, $right ), $activity_id, $left, $right, $spam_sql ); 511 512 512 513 // Retrieve all descendants of the $root node
Note: See TracChangeset
for help on using the changeset viewer.