2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

correct logic, add missing permalink creator

This commit is contained in:
Sam 2015-08-03 17:35:35 +10:00
parent fd82107df8
commit a1f02d4baa

View file

@ -63,6 +63,7 @@ class ImportScripts::Lithium < ImportScripts::Base
import_accepted_answers
import_pms
close_topics
create_permalinks
post_process_posts
end
@ -728,9 +729,6 @@ SQL
return nil
end
def to_markdown(html)
end
def post_process_posts
puts "", "Postprocessing posts..."
@ -773,7 +771,7 @@ SQL
# we need an upload here
upload_name = $1 if uri.path =~ /image-id\/([^\/]+)/
if upload_name
png = UPLOAD_DIR + "/" + upload_name + ".png"
jpg = UPLOAD_DIR + "/" + upload_name + ".jpg"
@ -783,6 +781,7 @@ SQL
elsif File.exists?(jpg)
image = jpg
end
end
if image
File.open(image) do |file|