mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
category export: export img src with absolute urls so pull_hotlink_image can move it over later
This commit is contained in:
parent
223e324eb9
commit
9331dfa63c
1 changed files with 3 additions and 1 deletions
|
@ -71,7 +71,9 @@ module ImportExport
|
|||
topic_data[:posts] = []
|
||||
|
||||
topic.ordered_posts.find_each do |post|
|
||||
topic_data[:posts] << POST_ATTRS.inject({}) { |h, a| h[a] = post.send(a); h; }
|
||||
h = POST_ATTRS.inject({}) { |h, a| h[a] = post.send(a); h; }
|
||||
h[:raw] = h[:raw].gsub('src="/uploads', "src=\"#{Discourse.base_url_no_prefix}/uploads")
|
||||
topic_data[:posts] << h
|
||||
end
|
||||
|
||||
@export_data[:topics] << topic_data
|
||||
|
|
Loading…
Reference in a new issue