Make image MD5 search match "View Same" link on archives. #717
This commit is contained in:
parent
35d848997a
commit
4ef3f19603
@ -79,11 +79,15 @@ Redirect =
|
|||||||
type
|
type
|
||||||
if type is 'capcode'
|
if type is 'capcode'
|
||||||
value = {'Developer': 'dev'}[value] or value.toLowerCase()
|
value = {'Developer': 'dev'}[value] or value.toLowerCase()
|
||||||
|
else if type is 'image'
|
||||||
|
value = value.replace /[+/=]/g, (c) -> {'+': '-', '/': '_', '=': ''}[c]
|
||||||
value = encodeURIComponent value
|
value = encodeURIComponent value
|
||||||
path = if archive.software is 'foolfuuka'
|
path = if archive.software is 'foolfuuka'
|
||||||
"#{boardID}/search/#{type}/#{value}"
|
"#{boardID}/search/#{type}/#{value}/"
|
||||||
|
else if type is 'image'
|
||||||
|
"#{boardID}/image/#{value}"
|
||||||
else
|
else
|
||||||
"#{boardID}/?task=search2&search_#{if type is 'image' then 'media_hash' else type}=#{value}"
|
"#{boardID}/?task=search2&search_#{type}=#{value}"
|
||||||
"#{Redirect.protocol archive}#{archive.domain}/#{path}"
|
"#{Redirect.protocol archive}#{archive.domain}/#{path}"
|
||||||
|
|
||||||
report: (archive, {boardID, postID}) ->
|
report: (archive, {boardID, postID}) ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user