Fix #1156: Allow sequential search navigator to work without a search.

This commit is contained in:
evazion
2017-07-24 19:30:30 -05:00
parent a177473aee
commit 0129891213
4 changed files with 18 additions and 19 deletions

View File

@@ -189,7 +189,11 @@ class PostPresenter < Presenter
end
def has_nav_links?(template)
(CurrentUser.user.enable_sequential_post_navigation && template.params[:tags].present? && template.params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/) || @post.pools.undeleted.any? || @post.favorite_groups(active_id=template.params[:favgroup_id]).any?
has_sequential_navigation?(template) || @post.pools.undeleted.any? || @post.favorite_groups(active_id=template.params[:favgroup_id]).any?
end
def has_sequential_navigation?(template)
CurrentUser.user.enable_sequential_post_navigation && template.params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/i
end
def post_footer_for_pool_html(template)