mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: UploadRecovery
should look at links too.
This commit is contained in:
@@ -4,7 +4,7 @@ class UploadRecovery
|
||||
end
|
||||
|
||||
def recover(posts = Post)
|
||||
posts.where("raw LIKE '%upload:\/\/%'").find_each do |post|
|
||||
posts.where("raw LIKE '%upload:\/\/%' OR raw LIKE '%href=%'").find_each do |post|
|
||||
begin
|
||||
analyzer = PostAnalyzer.new(post.raw, post.topic_id)
|
||||
|
||||
@@ -28,7 +28,7 @@ class UploadRecovery
|
||||
elsif media.name == "a"
|
||||
href = media["href"]
|
||||
|
||||
if data = Upload.extract_upload_url(href)
|
||||
if href && data = Upload.extract_upload_url(href)
|
||||
sha1 = data[2]
|
||||
|
||||
unless upload = Upload.get_from_url(href)
|
||||
|
Reference in New Issue
Block a user