potential fix for #2404

This commit is contained in:
r888888888
2015-06-10 17:28:28 -07:00
parent 76dd4bac22
commit fd74f860ee
12 changed files with 34 additions and 36 deletions

View File

@@ -5,11 +5,11 @@ module Sources
url =~ /^https?:\/\/(?:.+?\.)?deviantart\.(?:com|net)/
end
def referer_url(template)
if template.params[:ref] =~ /deviantart\.com\/art\// && template.params[:url] =~ /https?:\/\/(?:fc|th|pre|orig|img)\d{2}\.deviantart\.net\//
template.params[:ref]
def referer_url
if @referer_url =~ /deviantart\.com\/art\// && @url =~ /https?:\/\/(?:fc|th|pre|orig|img)\d{2}\.deviantart\.net\//
@referer_url
else
template.params[:url]
@url
end
end