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:
@@ -19,7 +19,7 @@
|
||||
|
||||
<%= render "posts/partials/index/options" %>
|
||||
|
||||
<%= render "posts/partials/index/related" %>
|
||||
<%= render "posts/partials/index/related", post_set: @post_set %>
|
||||
<% end %>
|
||||
|
||||
<% content_for(:content) do %>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<li><%= link_to "Deleted", posts_path(tags: "#{params[:tags]} status:deleted") %></li>
|
||||
<li><%= link_to "Random", random_posts_path(tags: params[:tags]), id: "random-post", "data-shortcut": "r" %></li>
|
||||
<% if Tag.is_simple_tag?(params[:tags]) %>
|
||||
<% if post_set.query.is_simple_tag? %>
|
||||
<li><%= link_to "History", post_versions_path(search: { changed_tags: params[:tags] }) %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "Count", posts_counts_path(:tags => params[:tags]) %></li>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<% if @post_set.is_empty_tag? %>
|
||||
<% if @post_set.query.is_empty_search? %>
|
||||
<% page_title("#{Danbooru.config.app_name}: Anime Image Board", suffix: nil) %>
|
||||
<% meta_description("#{Danbooru.config.canonical_app_name} is the original anime image 'booru. Find over 3.75 million anime pictures categorized by over 100 million tags.") %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user