update #2216 for old urls

* follow-up to b194935bde
* doesn't solve the parentheses problem
This commit is contained in:
ghostrigger
2014-07-03 00:10:48 +08:00
parent 13a97d9b8c
commit 037967028f

View File

@@ -311,7 +311,7 @@ class Post < ActiveRecord::Base
when %r{\Ahttps?://pictures\.hentai-foundry\.com//[^/]/([^/]+)/(\d+)\.}i
"http://www.hentai-foundry.com/pictures/user/#{$1}/#{$2}"
when %r{\Ahttp://blog-imgs-\d+(?:-origin)?\.fc2\.com/[^/]/[^/]/[^/]/([^/]+)/([^.]+\.[^?]+)}i
when %r{\Ahttp://blog(?:(?:-imgs-)?\d*(?:-origin)?)?\.fc2\.com/(?:(?:[^/]/){3}|(?:[^/]/))([^/]+)/(?:file/)?([^\.]+\.[^\?]+)}i
username = $1
filename = $2
"http://#{username}.blog.fc2.com/img/#{filename}/"