mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Merge pull request #2620 from Elberet/smf2-import
Fix: messages imported in wrong order
This commit is contained in:
commit
8b79e0f6de
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ class ImportScripts::Smf2 < ImportScripts::Base
|
||||||
topics = Enumerator.new do |y|
|
topics = Enumerator.new do |y|
|
||||||
last_topic_id = nil
|
last_topic_id = nil
|
||||||
topic_messages = nil
|
topic_messages = nil
|
||||||
query("SELECT id_msg, id_topic, body FROM {prefix}messages ORDER BY id_topic ASC, poster_time ASC") do |message|
|
query("SELECT id_msg, id_topic, body FROM {prefix}messages ORDER BY id_topic ASC, id_msg ASC") do |message|
|
||||||
if last_topic_id != message[:id_topic]
|
if last_topic_id != message[:id_topic]
|
||||||
y << topic_messages
|
y << topic_messages
|
||||||
last_topic_id = message[:id_topic]
|
last_topic_id = message[:id_topic]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue