add additional search links in reports, fix order:random for post count=0

This commit is contained in:
r888888888
2015-06-18 17:16:40 -07:00
parent 0239b0077f
commit 29a7b51fcb
3 changed files with 31 additions and 33 deletions

View File

@@ -73,6 +73,8 @@ module PostSets
count = ::Post.fast_count(tag_string, :statement_timeout => CurrentUser.user.statement_timeout)
if count == 1_000_000 # count timed out
chance = 0.01
elsif count == 0
chance = 1
else
chance = per_page / count.to_f
end