FIX: Handle more cases in UploadRecovery.

This commit is contained in:
Guo Xiang Tan 2019-04-02 11:29:26 +08:00
parent 4b0ac91bfb
commit 1f9799c979

View File

@ -4,7 +4,13 @@ class UploadRecovery
end
def recover(posts = Post)
posts.where("raw LIKE '%upload:\/\/%' OR raw LIKE '%href=%'").find_each do |post|
posts.where("
raw LIKE '%upload:\/\/%'
OR raw LIKE '%href=%'
OR raw LIKE '%src=%'
OR raw LIKE '%[img]%'
").find_each do |post|
begin
analyzer = PostAnalyzer.new(post.raw, post.topic_id)