Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/14/2014 01:12:13 AM (10 years ago)
Author:
boonebgorges
Message:

Remove unnecessary parameter sanitization from meta functions

WP's meta API functions already perform the necessary sanitization.

See #5399

File:
1 edited

Legend:

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

    r8133 r8135  
    572572    global $wpdb, $bp;
    573573
    574     // Legacy - Return false if any of the above values are not set
    575     if ( ! is_numeric( $activity_id ) ) {
    576         return false;
    577     }
    578 
    579574    // Legacy - if no meta_key is passed, delete all for the item
    580575    if ( empty( $meta_key ) ) {
     
    616611 */
    617612function bp_activity_get_meta( $activity_id = 0, $meta_key = '', $single = true ) {
    618 
    619     // Make sure activity_id is valid
    620     if ( empty( $activity_id ) || ! is_numeric( $activity_id ) ) {
    621         return false;
    622     }
    623 
    624613    add_filter( 'query', 'bp_filter_metaid_column_name' );
    625614    $retval = get_metadata( 'activity', $activity_id, $meta_key, $single );
     
    647636 */
    648637function bp_activity_update_meta( $activity_id, $meta_key, $meta_value, $prev_value = '' ) {
    649 
    650     // Legacy - Make sure activity_id is valid
    651     if ( ! is_numeric( $activity_id ) ) {
    652         return false;
    653     }
    654 
    655638    add_filter( 'query', 'bp_filter_metaid_column_name' );
    656639    $retval = update_metadata( 'activity', $activity_id, $meta_key, $meta_value, $prev_value );
Note: See TracChangeset for help on using the changeset viewer.