File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ SET o.subforum_count = r.subforums;
1010UPDATE wp_bbp_forums f LEFT JOIN (
1111 SELECT t .forum_id , MAX (t .topic_id ) AS topic_id
1212 FROM wp_bbp_topics t
13+ INNER JOIN wp_bbp_forums f ON f .forum_id = t .forum_id AND f .forum_type = ' forum'
1314 INNER JOIN wp_posts p ON p .ID = t .topic_id AND p .post_status IN (' publish' , ' closed' )
1415 GROUP BY t .forum_id ) t ON t .forum_id = f .forum_id
1516SET f .last_topic_id = t .topic_id ;
@@ -18,6 +19,7 @@ SET f.last_topic_id = t.topic_id;
1819UPDATE wp_bbp_forums f LEFT JOIN (
1920 SELECT t .forum_id , MAX (t .reply_id ) AS reply_id
2021 FROM wp_bbp_replies t
22+ INNER JOIN wp_bbp_forums f ON f .forum_id = t .forum_id AND f .forum_type = ' forum'
2123 INNER JOIN wp_posts p ON p .ID = t .reply_id AND p .post_status IN (' publish' )
2224 GROUP BY t .forum_id ) r ON r .forum_id = f .forum_id
2325SET f .last_reply_id = r .reply_id ;
You can’t perform that action at this time.
0 commit comments