Changeset 6644 for trunk/src/includes/admin/tools/repair.php
- Timestamp:
- 08/07/2017 08:27:00 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/tools/repair.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools/repair.php
r6573 r6644 281 281 // Post types and status 282 282 $rpt = bbp_get_reply_post_type(); 283 $tps = bbp_get_trash_status_id(); 284 $sps = bbp_get_spam_status_id(); 285 $pps = bbp_get_pending_status_id(); 286 287 $sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$rpt}' AND `post_status` IN ( '{$tps}', '{$sps}', '{$pps}' ) GROUP BY `post_parent`)"; 283 $sta = bbp_get_non_public_topic_statuses(); 284 285 // SQL 286 $sql_status = "'" . implode( "','", $sta ) . "'"; 287 288 $sql = "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_reply_count_hidden', COUNT(`post_status`) as `meta_value` FROM `{$bbp_db->posts}` WHERE `post_type` = '{$rpt}' AND `post_status` IN ({$sql_status}) GROUP BY `post_parent`)"; 288 289 if ( is_wp_error( $bbp_db->query( $sql ) ) ) { 289 290 return array( 2, sprintf( $statement, $result ) );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)