mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
update bbcode dialect and fix vBulletin importer
This commit is contained in:
@ -235,9 +235,11 @@ class ImportScripts::Base
|
||||
|
||||
def create_user(opts, import_id)
|
||||
opts.delete(:id)
|
||||
merge = opts.delete(:merge)
|
||||
post_create_action = opts.delete(:post_create_action)
|
||||
|
||||
existing = User.where(email: opts[:email].downcase, username: opts[:username]).first
|
||||
return existing if existing && existing.custom_fields["import_id"].to_i == import_id.to_i
|
||||
return existing if existing && (merge || existing.custom_fields["import_id"].to_i == import_id.to_i)
|
||||
|
||||
bio_raw = opts.delete(:bio_raw)
|
||||
website = opts.delete(:website)
|
||||
@ -434,12 +436,12 @@ class ImportScripts::Base
|
||||
end
|
||||
|
||||
def update_bumped_at
|
||||
puts "updating bumped_at on topics"
|
||||
puts "", "updating bumped_at on topics"
|
||||
Post.exec_sql("update topics t set bumped_at = (select max(created_at) from posts where topic_id = t.id and post_type != #{Post.types[:moderator_action]})")
|
||||
end
|
||||
|
||||
def update_feature_topic_users
|
||||
puts "updating featured topic users"
|
||||
puts "", "updating featured topic users"
|
||||
|
||||
total_count = Topic.count
|
||||
progress_count = 0
|
||||
@ -452,7 +454,7 @@ class ImportScripts::Base
|
||||
end
|
||||
|
||||
def update_category_featured_topics
|
||||
puts "updating featured topics in categories"
|
||||
puts "", "updating featured topics in categories"
|
||||
|
||||
total_count = Category.count
|
||||
progress_count = 0
|
||||
@ -465,7 +467,7 @@ class ImportScripts::Base
|
||||
end
|
||||
|
||||
def update_topic_count_replies
|
||||
puts "updating user topic reply counts"
|
||||
puts "", "updating user topic reply counts"
|
||||
|
||||
total_count = User.real.count
|
||||
progress_count = 0
|
||||
|
Reference in New Issue
Block a user