Changeset 4405
- Timestamp:
- 11/13/2012 05:23:17 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/admin/tools.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/admin/tools.php
r4402 r4405 303 303 304 304 $statement = __( 'Repairing BuddyPress group-forum relationships… %s', 'bbpress' ); 305 $count = 0; 305 $g_count = 0; 306 $f_count = 0; 306 307 307 308 // Copy the BuddyPress filter here, incase BuddyPress is not active … … 337 338 // Bump the count 338 339 if ( !empty( $updated ) && ! is_wp_error( $updated ) ) { 339 ++$count; 340 ++$g_count; 341 } 342 343 // Update group's forum metadata 344 $group_id = (int) $wpdb->get_var( "SELECT `group_id` FROM `{$tablename}` WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->ID}';" ); 345 if ( !empty( $group_id ) ) { 346 update_post_meta( $group_forums->ID, '_bbp_group_ids', array( $group_id ) ); 347 ++$f_count; 340 348 } 341 349 } … … 374 382 375 383 // Complete results 376 $result = sprintf( __( 'Complete! %s group forums updated.', 'bbpress' ), bbp_number_format( $count ) );384 $result = sprintf( __( 'Complete! %s groups updated; %s forums updated.', 'bbpress' ), bbp_number_format( $g_count ), bbp_number_format( $f_count ) ); 377 385 return array( 0, sprintf( $statement, $result ) ); 378 386 }
Note: See TracChangeset
for help on using the changeset viewer.