Skip to:
Content

bbPress.org

Changeset 5374


Ignore:
Timestamp:
06/06/2014 01:55:54 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Update reply position repair tool to delete invalid _bbp_reply_to fields, and tweak name and description. Props netweb. See #2588. (2.5 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/includes/admin/tools.php

    r5367 r5374  
    164164        15 => array( 'bbp-sync-all-topics-forums',   __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'bbp_admin_repair_freshness'                ),
    165165        20 => array( 'bbp-sync-all-topics-sticky',   __( 'Recalculate the sticky relationship of each topic', 'bbpress' ), 'bbp_admin_repair_sticky'                   ),
    166         25 => array( 'bbp-sync-all-reply-positions', __( 'Recalculate the reply position hierarchy',          'bbpress' ), 'bbp_admin_repair_reply_menu_order'         ),
     166        25 => array( 'bbp-sync-all-reply-positions', __( 'Recalculate the position of each reply',            'bbpress' ), 'bbp_admin_repair_reply_menu_order'         ),
    167167        30 => array( 'bbp-group-forums',             __( 'Repair BuddyPress Group Forum relationships',       'bbpress' ), 'bbp_admin_repair_group_forum_relationship' ),
    168168        35 => array( 'bbp-forum-topics',             __( 'Count topics in each forum',                        'bbpress' ), 'bbp_admin_repair_forum_topic_count'        ),
     
    11461146
    11471147    $statement = __( 'Recalculating reply menu order … %s', 'bbpress' );
    1148     $result    = __( 'No reply hierachy to recalculate!',          'bbpress' );
     1148    $result    = __( 'No reply positions to recalculate!',         'bbpress' );
     1149
     1150    // Delete cases where `_bbp_reply_to` was accidentally set to itself
     1151    if ( is_wp_error( $wpdb->query( "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` = '_bbp_reply_to' AND `post_id` = `meta_value`;" ) ) ) {
     1152        return array( 1, sprintf( $statement, $result ) );
     1153    }
    11491154
    11501155    // Post type
Note: See TracChangeset for help on using the changeset viewer.