mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 17:25:42 +08:00
DEV: Fix syntax/formatting in xenforo import script (#19761)
Followup to 7dfe85fc
This commit is contained in:
parent
41acabad19
commit
d5491b13f5
@ -89,6 +89,7 @@ class ImportScripts::XenForo < ImportScripts::Base
|
||||
post_create_action: proc do |u|
|
||||
import_avatar(user['id'], u)
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -316,7 +317,7 @@ class ImportScripts::XenForo < ImportScripts::Base
|
||||
id: message_id,
|
||||
user_id: user_id,
|
||||
raw: raw,
|
||||
created_at: Time.zone.at(post["message_date"].to_i),
|
||||
created_at: Time.zone.at(post["message_date"].to_i),
|
||||
import_mode: true
|
||||
}
|
||||
unless post["topic_id"] > 0
|
||||
@ -454,7 +455,7 @@ class ImportScripts::XenForo < ImportScripts::Base
|
||||
# not all attachments have an [ATTACH=] tag so we need to get the other ID's from the xf_attachment table
|
||||
if xf_type == :attachment && import_id > 0
|
||||
sql = "SELECT attachment_id FROM #{TABLE_PREFIX}attachment WHERE content_id=#{import_id} and content_type='post';"
|
||||
ids.merge(mysql_query(sql).to_a.map { |v| v["attachment_id"].to_i})
|
||||
ids.merge(mysql_query(sql).to_a.map { |v| v["attachment_id"].to_i })
|
||||
end
|
||||
|
||||
ids.each do |id|
|
||||
|
Loading…
x
Reference in New Issue
Block a user