Changeset 3505 for branches/plugin/bbp-includes/bbp-user-functions.php
- Timestamp:
- 09/10/2011 10:27:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-user-functions.php
r3504 r3505 1023 1023 1024 1024 // Make array of post types to mark as spam 1025 $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ); 1026 $post_types = "'" . implode( "', '", $post_types ) . "'"; 1025 $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ); 1026 $post_types = "'" . implode( "', '", $post_types ) . "'"; 1027 $status = bbp_get_public_status_id(); 1027 1028 1028 1029 // Loop through blogs and remove their posts … … 1033 1034 1034 1035 // Get topics and replies 1035 $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = ' publish' AND post_type IN ({$post_types})" );1036 $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" ); 1036 1037 1037 1038 // Loop through posts and spam them … … 1097 1098 1098 1099 // Arm the torpedos 1099 global $wpdb , $bbp;1100 global $wpdb; 1100 1101 1101 1102 // Get the blog IDs of the user to mark as spam … … 1109 1110 $post_types = array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ); 1110 1111 $post_types = "'" . implode( "', '", $post_types ) . "'"; 1112 $status = bbp_get_spam_status_id(); 1111 1113 1112 1114 // Loop through blogs and remove their posts … … 1117 1119 1118 1120 // Get topics and replies 1119 $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$ bbp->spam_status_id}' AND post_type IN ({$post_types})" );1121 $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_author = {$user_id} AND post_status = '{$status}' AND post_type IN ({$post_types})" ); 1120 1122 1121 1123 // Loop through posts and spam them
Note: See TracChangeset
for help on using the changeset viewer.