Skip to:
Content

Changeset 6521


Ignore:
Timestamp:
11/14/12 22:11:02 (17 months ago)
Author:
djpaul
Message:

Fix more prepare() warnings in Activity. See #4654

File:
1 edited

Legend:

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

    r6498 r6521  
    402402 
    403403        // Fetch the activity IDs so we can delete any comments for this activity item 
    404         $activity_ids = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} {$where_sql}" ) ); 
    405  
    406         if ( !$wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} {$where_sql}" ) ) ) 
     404        $activity_ids = $wpdb->get_col( "SELECT id FROM {$bp->activity->table_name} {$where_sql}" ); 
     405 
     406        if ( !$wpdb->query( "DELETE FROM {$bp->activity->table_name} {$where_sql}" ) ) 
    407407            return false; 
    408408 
     
    425425            $activity_ids = implode ( ',', array_map( 'absint', explode ( ',', $activity_ids ) ) ); 
    426426 
    427         return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND item_id IN ({$activity_ids})" ) ); 
     427        return $wpdb->query( "DELETE FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND item_id IN ({$activity_ids})" ); 
    428428    } 
    429429 
     
    436436            $activity_ids = implode ( ',', array_map( 'absint', explode ( ',', $activity_ids ) ) ); 
    437437 
    438         return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" ) ); 
     438        return $wpdb->query( "DELETE FROM {$bp->activity->table_name_meta} WHERE activity_id IN ({$activity_ids})" ); 
    439439    } 
    440440 
Note: See TracChangeset for help on using the changeset viewer.