Changeset 5829 for trunk/src/includes/admin/tools.php
- Timestamp:
- 07/14/2015 12:46:38 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/tools.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools.php
r5827 r5829 510 510 511 511 // Bump the count 512 if ( ! empty( $updated ) && ! is_wp_error( $updated ) ) {512 if ( ! empty( $updated ) && ! is_wp_error( $updated ) ) { 513 513 ++$g_count; 514 514 } … … 516 516 // Update group to forum relationship data 517 517 $group_id = (int) $bbp_db->get_var( "SELECT `group_id` FROM `{$groups_meta_table}` WHERE `meta_key` = 'forum_id' AND `meta_value` = '{$group_forums->ID}';" ); 518 if ( ! empty( $group_id ) ) {518 if ( ! empty( $group_id ) ) { 519 519 520 520 // Update the group to forum meta connection in forums … … 621 621 622 622 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 623 if ( ! empty( $forums ) ) {623 if ( ! empty( $forums ) ) { 624 624 foreach ( $forums as $forum ) { 625 625 bbp_update_forum_topic_count( $forum->ID ); … … 668 668 // Recalculate the metas key _bbp_reply_count and _bbp_total_reply_count for each forum 669 669 $forums = get_posts( array( 'post_type' => bbp_get_forum_post_type(), 'numberposts' => -1 ) ); 670 if ( ! empty( $forums ) ) {670 if ( ! empty( $forums ) ) { 671 671 foreach ( $forums as $forum ) { 672 672 bbp_update_forum_reply_count( $forum->ID ); … … 1163 1163 // Loop through forums 1164 1164 foreach ( $forums as $forum_id ) { 1165 if ( ! bbp_is_forum_category( $forum_id ) ) {1165 if ( ! bbp_is_forum_category( $forum_id ) ) { 1166 1166 bbp_update_forum( array( 'forum_id' => $forum_id ) ); 1167 1167 } … … 1607 1607 /** Post Meta *************************************************************/ 1608 1608 1609 if ( ! empty( $sql_posts ) ) {1609 if ( ! empty( $sql_posts ) ) { 1610 1610 $sql_meta = array(); 1611 1611 foreach ( $sql_posts as $key => $value ) { … … 1629 1629 1630 1630 // First, if we're deleting previously imported users, delete them now 1631 if ( ! empty( $_POST['bbpress-delete-imported-users'] ) ) {1631 if ( ! empty( $_POST['bbpress-delete-imported-users'] ) ) { 1632 1632 $sql_users = $bbp_db->get_results( "SELECT `user_id` FROM `{$bbp_db->usermeta}` WHERE `meta_key` = '_bbp_user_id'", OBJECT_K ); 1633 if ( ! empty( $sql_users ) ) {1633 if ( ! empty( $sql_users ) ) { 1634 1634 $sql_meta = array(); 1635 1635 foreach ( $sql_users as $key => $value ) {
Note: See TracChangeset
for help on using the changeset viewer.