Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/12/2017 09:23:32 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Engagements: Revert part of r6525, and adjust some actions.

  • Engagements will need to be "public only" for 2.6, and we can reconsider what private/hidden engagements look like later
  • Make sure that engagements are saved before voice counts are done
  • Use new is_public style wrapper function for topics & replies where appropriate
  • Remove a few current_filter() checks that should no longer be necessary with current action hook implementation
  • There may be more clean-up necessary here, but this is required to bring all unit-tests back to passing as they've been written, specifically things hooked to the bbp_insert_topic and bbp_insert_reply hooks

See #3068. Hat-tip netweb.

File:
1 edited

Legend:

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

    r6525 r6534  
    178178    $tpt = bbp_get_topic_post_type();
    179179    $rpt = bbp_get_reply_post_type();
     180    $pps = bbp_get_public_status_id();
     181    $cps = bbp_get_closed_status_id();
    180182    $sql = "INSERT INTO {$bbp_db->postmeta} (post_id, meta_key, meta_value) (
    181183            SELECT postmeta.meta_value, '_bbp_engagement', posts.post_author
     
    185187                    AND postmeta.meta_key = '_bbp_topic_id'
    186188                WHERE posts.post_type IN (%s, %s)
     189                    AND posts.post_status IN (%s, %s)
    187190                GROUP BY postmeta.meta_value, posts.post_author)";
    188191
    189192    // Run the big query
    190     $prepare     = $bbp_db->prepare( $sql, $tpt, $rpt );
     193    $prepare     = $bbp_db->prepare( $sql, $tpt, $rpt, $pps, $cps );
    191194    $engagements = $bbp_db->query( $prepare );
    192195
Note: See TracChangeset for help on using the changeset viewer.