Fix #3527: Bookmarklet timeouts for Members.

This commit is contained in:
evazion
2018-02-01 17:35:20 -06:00
parent 146b27f4cf
commit d4298ea493

View File

@@ -75,9 +75,9 @@ class UploadsController < ApplicationController
protected
def find_post_by_url(normalized_url)
if normalized_url.nil?
Post.where(source: params[:url]).first
Post.where("SourcePattern(lower(posts.source)) = ?", params[:url]).first
else
Post.where(source: [params[:url], @normalized_url]).first
Post.where("SourcePattern(lower(posts.source)) IN (?)", [params[:url], @normalized_url]).first
end
end