Merge pull request #4461 from pfaffman/mbox-sort-order
mbox: sort input files by title, sort messages by date
This commit is contained in:
commit
7bbf5158de
|
@ -63,6 +63,8 @@ class ImportScripts::Mbox < ImportScripts::Base
|
||||||
|
|
||||||
files.flatten!
|
files.flatten!
|
||||||
|
|
||||||
|
files.sort!
|
||||||
|
|
||||||
files.each_with_index do |f, idx|
|
files.each_with_index do |f, idx|
|
||||||
if SPLIT_AT.present?
|
if SPLIT_AT.present?
|
||||||
msg = ""
|
msg = ""
|
||||||
|
@ -310,7 +312,8 @@ class ImportScripts::Mbox < ImportScripts::Base
|
||||||
message,
|
message,
|
||||||
category
|
category
|
||||||
FROM emails
|
FROM emails
|
||||||
WHERE reply_to IS NULL")
|
WHERE reply_to IS NULL
|
||||||
|
ORDER BY DATE(email_date)")
|
||||||
|
|
||||||
topic_count = all_topics.size
|
topic_count = all_topics.size
|
||||||
|
|
||||||
|
@ -376,7 +379,9 @@ class ImportScripts::Mbox < ImportScripts::Base
|
||||||
message,
|
message,
|
||||||
reply_to
|
reply_to
|
||||||
FROM emails
|
FROM emails
|
||||||
WHERE reply_to IS NOT NULL")
|
WHERE reply_to IS NOT NULL
|
||||||
|
ORDER BY DATE(email_date)
|
||||||
|
")
|
||||||
|
|
||||||
post_count = replies.size
|
post_count = replies.size
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue