Support searching for custom flags in archive. #1403

This commit is contained in:
ccd0 2017-06-27 15:20:48 -07:00
parent 79f00c1edd
commit 74394adc47

View File

@ -38,15 +38,19 @@ ArchiveLink =
true
else
(post) ->
typeParam = if type is 'country' and post.info.flagCodeTroll
'tag'
else
type
value = if type is 'country'
post.info.flagCode
post.info.flagCode or post.info.flagCodeTroll
else
Filter[type] post
# We want to parse the exact same stuff as the filter does already.
return false unless value
el.href = Redirect.to 'search',
boardID: post.board.ID
type: type
type: typeParam
value: value
isSearch: true
true