Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/16/2011 10:41:52 PM (13 years ago)
Author:
boonebgorges
Message:

Additional bp_get_user_meta_key() applications in query classes, plus wpdb->prepare() cleanup. References #2952. Props nacin.

File:
1 edited

Legend:

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

    r4372 r4380  
    202202        global $wpdb, $bp;
    203203
    204         return $wpdb->get_results( $wpdb->prepare( "SELECT meta_value as last_activity, user_id FROM " . CUSTOM_USER_META_TABLE . " WHERE meta_key = '" . bp_get_user_meta_key( 'last_activity' ) . "' AND user_id IN ( {$user_ids} ) ORDER BY meta_value DESC" ) );
     204        return $wpdb->get_results( $wpdb->prepare( "SELECT meta_value as last_activity, user_id FROM " . CUSTOM_USER_META_TABLE . " WHERE meta_key = %s AND user_id IN ( {$user_ids} ) ORDER BY meta_value DESC", bp_get_user_meta_key( 'last_activity' ) ) );
    205205    }
    206206
Note: See TracChangeset for help on using the changeset viewer.