Changeset 7134 for trunk/src/includes/admin/tools/repair.php
- Timestamp:
- 08/14/2020 05:47:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/tools/repair.php
r7006 r7134 1164 1164 $tpt = bbp_get_topic_post_type(); 1165 1165 $rpt = bbp_get_reply_post_type(); 1166 $fmt = bbp_get_forum_post_type(); 1166 1167 1167 1168 // Next, give all the topics their parent forum id. … … 1172 1173 WHERE `topic`.`post_type` = '{$tpt}' 1173 1174 GROUP BY `topic`.`ID` )" ) ) ) { 1175 return array( 2, sprintf( $statement, $result ) ); 1176 } 1177 1178 // Next, give all the forums their parent forum id. 1179 if ( is_wp_error( $bbp_db->query( "INSERT INTO `{$bbp_db->postmeta}` (`post_id`, `meta_key`, `meta_value`) 1180 ( SELECT `forum`.`ID`, '_bbp_forum_id', `forum`.`post_parent` 1181 FROM `$bbp_db->posts` 1182 AS `forum` 1183 WHERE `forum`.`post_type` = '{$fmt}' 1184 GROUP BY `forum`.`ID` )" ) ) ) { 1174 1185 return array( 2, sprintf( $statement, $result ) ); 1175 1186 }
Note: See TracChangeset
for help on using the changeset viewer.