Changeset 6188 for trunk/src/includes/admin/tools.php
- Timestamp:
- 12/27/2016 11:07:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools.php
r6183 r6188 2246 2246 // Add user ID to all favorited posts 2247 2247 foreach ( $post_ids as $post_id ) { 2248 2249 // Skip if already exists 2250 if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %d" ), $post_id, '_bbp_favorite', $meta->user_id ) ) { 2251 continue; 2252 } 2253 2254 // Add the post meta 2248 2255 $added = add_post_meta( $post_id, '_bbp_favorite', $meta->user_id, false ); 2249 2256 … … 2302 2309 // Add user ID to all favorited posts 2303 2310 foreach ( $post_ids as $post_id ) { 2311 2312 // Skip if already exists 2313 if ( $bbp_db->get_var( $bbp_db->prepare( "SELECT COUNT(*) FROM {$bbp_db->postmeta} WHERE post_id = %d AND meta_key = %s AND meta_value = %d" ), $post_id, '_bbp_subscription', $meta->user_id ) ) { 2314 continue; 2315 } 2316 2317 // Add the post meta 2304 2318 $added = add_post_meta( $post_id, '_bbp_subscription', $meta->user_id, false ); 2305 2319
Note: See TracChangeset
for help on using the changeset viewer.