mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
generalize permalink URL in GetSatisfaction import script
This commit is contained in:
@ -343,7 +343,8 @@ class ImportScripts::GetSatisfaction < ImportScripts::Base
|
|||||||
tcf = topic.first_post.custom_fields
|
tcf = topic.first_post.custom_fields
|
||||||
if tcf && tcf["import_id"]
|
if tcf && tcf["import_id"]
|
||||||
slug = @topic_slug[tcf["import_id"].to_i]
|
slug = @topic_slug[tcf["import_id"].to_i]
|
||||||
slug = slug.gsub("https://community.unbounce.com/", "")
|
# TODO: replace "http://community.example.com/" with the URL of your community
|
||||||
|
slug = slug.gsub("http://community.example.com/", "")
|
||||||
Permalink.create(url: slug, topic_id: topic.id)
|
Permalink.create(url: slug, topic_id: topic.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user