Skip to:
Content

BuddyPress.org

Changeset 5917


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

Use wp_parse_id_list() in BP_Activity_Activity::get(). Props paulgibbs. (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-activity/bp-activity-classes.php

    r5915 r5917  
    135135                // Exclude specified items
    136136                if ( !empty( $exclude ) ) {
    137                         if ( is_array( $exclude ) ) {
    138                                 $exclude = implode ( ',', array_map( 'absint', $exclude ) );
    139                         } else {
    140                                 $exclude = implode ( ',', array_map( 'absint', explode ( ',', $exclude ) ) );
    141                         }
    142 
     137                        $exclude = wp_parse_id_list( $exclude );
    143138                        $where_conditions['exclude'] = "a.id NOT IN ({$exclude})";
    144139                }
    … …  
    146141                // The specific ids to which you want to limit the query
    147142                if ( !empty( $in ) ) {
    148                         if ( is_array( $in ) ) {
    149                                 $in = implode ( ',', array_map( 'absint', $in ) );
    150                         } else {
    151                                 $in = implode ( ',', array_map( 'absint', explode ( ',', $in ) ) );
    152                         }
    153 
     143                        $in = wp_parse_id_list( $in );
    154144                        $where_conditions['in'] = "a.id IN ({$in})";
    155145                }
Note: See TracChangeset for help on using the changeset viewer.