Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/13/2012 09:17:03 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Map $exclude to absint in BP_Activity_Activity::get()

File:
1 edited

Legend:

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

    r5729 r5910  
    137137
    138138        // Exclude specified items
    139         if ( $exclude )
     139        if ( !empty( $exclude ) ) {
     140            if ( is_array( $exclude ) ) {
     141                $exclude = implode ( ',', array_map( 'absint', $exclude ) );
     142            } else {
     143                $exclude = implode ( ',', array_map( 'absint', explode ( ',', $exclude ) ) );
     144            }
     145
    140146            $where_conditions['exclude'] = "a.id NOT IN ({$exclude})";
     147        }
    141148
    142149        // The specific ids to which you want to limit the query
Note: See TracChangeset for help on using the changeset viewer.