Skip to:
Content

bbPress.org

Changeset 5375


Ignore:
Timestamp:
06/06/2014 01:58:40 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. (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools.php

    r5368 r5375  
    289289        15 => array( 'bbp-sync-all-topics-forums',   __( 'Recalculate last activity in each topic and forum', 'bbpress' ), 'bbp_admin_repair_freshness'                ),
    290290        20 => array( 'bbp-sync-all-topics-sticky',   __( 'Recalculate sticky relationship of each topic',     'bbpress' ), 'bbp_admin_repair_sticky'                   ),
    291         25 => array( 'bbp-sync-all-reply-positions', __( 'Recalculate reply position hierarchy',              'bbpress' ), 'bbp_admin_repair_reply_menu_order'         ),
     291        25 => array( 'bbp-sync-all-reply-positions', __( 'Recalculate the position of each reply',            'bbpress' ), 'bbp_admin_repair_reply_menu_order'         ),
    292292        30 => array( 'bbp-group-forums',             __( 'Repair BuddyPress Group Forum relationships',       'bbpress' ), 'bbp_admin_repair_group_forum_relationship' ),
    293293        35 => array( 'bbp-forum-topics',             __( 'Count topics in each forum',                        'bbpress' ), 'bbp_admin_repair_forum_topic_count'        ),
     
    13211321
    13221322    $statement = __( 'Recalculating reply menu order … %s', 'bbpress' );
    1323     $result    = __( 'No reply hierachy to recalculate!',          'bbpress' );
     1323    $result    = __( 'No reply positions to recalculate!',         'bbpress' );
     1324
     1325    // Delete cases where `_bbp_reply_to` was accidentally set to itself
     1326    if ( is_wp_error( $wpdb->query( "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` = '_bbp_reply_to' AND `post_id` = `meta_value`;" ) ) ) {
     1327        return array( 1, sprintf( $statement, $result ) );
     1328    }
    13241329
    13251330    // Post type
Note: See TracChangeset for help on using the changeset viewer.