Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/11/2011 07:13:19 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Update remaining 'spam' and 'trash' post_status references to use _get_ functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-admin/bbp-functions.php

    r3505 r3506  
    280280        return array( 1, sprintf( $statement, $result ) );
    281281
    282     $sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$wpdb->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` IN ( '" . join( "','", array( 'trash', bbp_get_spam_status_id() ) ) . "') GROUP BY `post_parent`);";
     282    $sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$wpdb->posts}` WHERE `post_type` = '" . bbp_get_reply_post_type() . "' AND `post_status` IN ( '" . join( "','", array( bbp_get_trash_status_id(), bbp_get_spam_status_id() ) ) . "') GROUP BY `post_parent`);";
    283283    if ( is_wp_error( $wpdb->query( $sql ) ) )
    284284        return array( 2, sprintf( $statement, $result ) );
Note: See TracChangeset for help on using the changeset viewer.