update #1866 corrects first 3 octets

in the ip address
This commit is contained in:
ghostrigger
2014-06-23 08:12:02 +08:00
parent 3cdb9fe1c2
commit bd1de1d434

View File

@@ -332,7 +332,7 @@ class Post < ActiveRecord::Base
filename = $2
"http://#{subdomain}.wikia.com/wiki/File:#{filename}"
when %r{\Ahttp://(?:(?:\d{1,3}\.){1,3}\d{1,3}):(?:\d{1,5})/h/([a-f0-9]{40})-(?:\d+-){3}(?:png|gif|(?:jpe?g?))/keystamp=\d+-[a-f0-9]{10}/([^/]+)}i
when %r{\Ahttp://(?:(?:\d{1,3}\.){3}\d{1,3}):(?:\d{1,5})/h/([a-f0-9]{40})-(?:\d+-){3}(?:png|gif|(?:jpe?g?))/keystamp=\d+-[a-f0-9]{10}/([^/]+)}i
sha1hash = $1
filename = $2
"http://g.e-hentai.org/?f_shash=#{sha1hash}&fs_from=#{filename}"