mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:51:17 +08:00
FIX: Method from Telligent import script was deleted by accident
This commit is contained in:
@ -590,6 +590,18 @@ class ImportScripts::Telligent < ImportScripts::Base
|
|||||||
md
|
md
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mark_topics_as_solved
|
||||||
|
puts "", "Marking topics as solved..."
|
||||||
|
|
||||||
|
DB.exec <<~SQL
|
||||||
|
INSERT INTO topic_custom_fields (name, value, topic_id, created_at, updated_at)
|
||||||
|
SELECT 'accepted_answer_post_id', pcf.post_id, p.topic_id, p.created_at, p.created_at
|
||||||
|
FROM post_custom_fields pcf
|
||||||
|
JOIN posts p ON p.id = pcf.post_id
|
||||||
|
WHERE pcf.name = 'is_accepted_answer' AND pcf.value = 'true'
|
||||||
|
SQL
|
||||||
|
end
|
||||||
|
|
||||||
def add_permalink_normalizations
|
def add_permalink_normalizations
|
||||||
normalizations = SiteSetting.permalink_normalizations
|
normalizations = SiteSetting.permalink_normalizations
|
||||||
normalizations = normalizations.blank? ? [] : normalizations.split('|')
|
normalizations = normalizations.blank? ? [] : normalizations.split('|')
|
||||||
|
Reference in New Issue
Block a user