Some fixes for phpbb importer.

This commit is contained in:
Guo Xiang Tan 2016-03-01 10:20:27 +08:00
parent be5a54d67d
commit 0172684719
2 changed files with 10 additions and 5 deletions

View File

@ -111,7 +111,10 @@ module ImportScripts::PhpBB3
# uncomment below lines to create permalink for categories
# def create_category(opts, import_id)
# new_category = super
# Permalink.create(url: "viewforum.php?f=#{import_id}", category_id: new_category.id)
# url = "viewforum.php?f=#{import_id}"
# if !Permalink.find_by(url: url)
# Permalink.create(url: url, category_id: new_category.id)
# end
# new_category
# end

View File

@ -91,10 +91,12 @@ module ImportScripts::PhpBB3
end
if disable_email
user.email_digests = false
user.email_private_messages = false
user.email_direct = false
user.email_always = false
user_option = user.user_option
user_option.email_digests = false
user_option.email_private_messages = false
user_option.email_direct = false
user_option.email_always = false
user_option.save!
end
if user.save