This commit is contained in:
albert
2013-03-02 20:35:07 -05:00
parent 54f3610e51
commit 70e8635d33

View File

@@ -48,10 +48,14 @@ module PostSets
timeout = 300
end
temp = ::Post.with_timeout(timeout, Danbooru.config.blank_tag_search_fast_count || 1_000_000) do
temp = ::Post.with_timeout(timeout, nil) do
::Post.tag_match(tag_string).paginate(page, :count => ::Post.fast_count(tag_string), :limit => per_page)
end
if temp.nil?
temp = ::Post.where("FALSE").paginate(page)
end
temp.all
temp
end