From c11055d0f4724c894a7f94e421971e7c220ee812 Mon Sep 17 00:00:00 2001 From: saint Date: Sat, 17 Aug 2024 03:27:17 +1000 Subject: [PATCH] v0.39.7 Fixes/tweaks in calculate_dynamic_pool_size --- gossamer_forums.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gossamer_forums.rb b/gossamer_forums.rb index f1603fc..8f93d9f 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1138,7 +1138,7 @@ class GossamerForumsImporter < ImportScripts::Base #this parts needs to be synchronously to avoid race conditions # Fetch the post data for the given post_id (this is the first post in the topic) - row = execute_query("SELECT post_id, user_id_fk, forum_id_fk, post_root_id, post_subject, post_time, post_message, post_father_id, post_likes, post_replies FROM gforum_Post WHERE post_id = #{post_id}").first + row = execute_query("SELECT post_id, user_id_fk, forum_id_fk, post_root_id, post_subject, post_time, post_message, post_father_id, post_replies FROM gforum_Post WHERE post_id = #{post_id}").first # Early return if the post data is not found return unless row @@ -1216,7 +1216,6 @@ class GossamerForumsImporter < ImportScripts::Base raw: sanitized_post_message, created_at: Time.at(row['post_time']), updated_at: Time.at(row['post_time']), - like_count: row['post_likes'] || 0, reads: post_views || 0, post_number: post_number ) @@ -1235,7 +1234,7 @@ class GossamerForumsImporter < ImportScripts::Base insert_url_mapping(row['post_id'], new_url, unique_title) # Now fetch and import all replies to this topic - replies = execute_query("SELECT post_id, user_id_fk, post_message, post_time, post_likes FROM gforum_Post WHERE post_root_id = #{post_id} ORDER BY post_time ASC") + replies = execute_query("SELECT post_id, user_id_fk, post_message, post_time, FROM gforum_Post WHERE post_root_id = #{post_id} ORDER BY post_time ASC") # Import each reply sequentially replies.each do |reply_row| @@ -1259,7 +1258,6 @@ class GossamerForumsImporter < ImportScripts::Base raw: sanitized_reply_message, created_at: Time.at(reply_row['post_time']), updated_at: Time.at(reply_row['post_time']), - like_count: reply_row['post_likes'] || 0, post_number: post_number ) post.custom_fields['original_gossamer_id'] = reply_row['post_id']