search: move misc search parsing helpers to PostQueryBuilder.
* Move various search parser helper methods (`has_metatag?`, `is_single_tag?` et al) from PostSets and the Tag model to PostQueryBuilder. * Fix various minor bugs stemming from trying to check if a search query contains certain metatags using regexes or other adhoc techniques.
This commit is contained in:
@@ -163,7 +163,7 @@ class PostPresenter
|
||||
end
|
||||
|
||||
def has_sequential_navigation?(params)
|
||||
return false if Tag.has_metatag?(params[:q], :order, :ordfav, :ordpool)
|
||||
return false if PostQueryBuilder.new(params[:q]).has_metatag?(:order, :ordfav, :ordpool)
|
||||
return false if params[:pool_id].present? || params[:favgroup_id].present?
|
||||
return CurrentUser.user.enable_sequential_post_navigation
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user