Merge branch 'master' of https://github.com/r888888888/danbooru
This commit is contained in:
@@ -124,10 +124,10 @@ class Tag < ActiveRecord::Base
|
||||
def trending
|
||||
Cache.get("popular-tags-v3", 1.hour) do
|
||||
CurrentUser.scoped(User.admins.first, "127.0.0.1") do
|
||||
n = 8
|
||||
n = 24
|
||||
counts = {}
|
||||
|
||||
while counts.empty? && n < 256
|
||||
while counts.empty? && n < 1000
|
||||
tag_strings = Post.select_values_sql("select tag_string from posts where created_at >= ?", n.hours.ago)
|
||||
tag_strings.each do |tag_string|
|
||||
tag_string.scan(/\S+/).each do |tag|
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
class PostPresenter < Presenter
|
||||
attr_reader :pool, :next_post_in_pool
|
||||
|
||||
def self.preview(post, options = {})
|
||||
if post.is_deleted? && options[:tags] !~ /status:(?:all|any|deleted|banned)/ && !options[:raw]
|
||||
return ""
|
||||
@@ -231,6 +233,7 @@ class PostPresenter < Presenter
|
||||
pool_html << '</span> '
|
||||
|
||||
if pool.neighbors(@post).next
|
||||
@next_post_in_pool = pool.neighbors(@post).next
|
||||
pool_html << template.link_to("next ›".html_safe, template.post_path(pool.neighbors(@post).next, :pool_id => pool.id), :rel => next_rel, :class => "#{klass} next", :title => "to page #{pool.page_number(pool.neighbors(@post).next)}")
|
||||
match_found = true
|
||||
else
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<div id="a-index">
|
||||
<h1>Forum</h1>
|
||||
|
||||
<p>
|
||||
Categories:
|
||||
<%= link_to "All", forum_topics_path %>, <%= ForumTopic::CATEGORIES.map {|id, name| link_to_unless_current(name, forum_topics_path(:search => {:category_id => id}))}.join(", ").html_safe %>
|
||||
</p>
|
||||
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -13,7 +18,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @forum_topics.each do |topic| %>
|
||||
<tr class="forum-topic-row">
|
||||
<tr class="forum-topic-row forum-topic-category-<%= topic.category_id %>">
|
||||
<td>
|
||||
<% if topic.is_sticky? %>
|
||||
<span class="sticky">Sticky:</span>
|
||||
|
||||
@@ -116,6 +116,11 @@
|
||||
<meta name="twitter:image:width" content="<%= @post.image_width %>">
|
||||
<meta name="twitter:image:height" content="<%= @post.image_height %>">
|
||||
<% end %>
|
||||
|
||||
<% if @post.presenter.next_post_in_pool %>
|
||||
<link rel="prefetch" href="<%= post_path(@post.presenter.next_post_in_pool, :pool_id => params[:pool_id]) %>">
|
||||
<link rel="prerender" href="<%= post_path(@post.presenter.next_post_in_pool, :pool_id => params[:pool_id]) %>">
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<th>Posts</th>
|
||||
<th>Deleted</th>
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<th><abbr title="1+ Favorite(s) Binomial Confidence Interval">1+ FBCI</abbr></th>
|
||||
<th><abbr title="5+ Favorites Binomial Confidence Interval">5+ FBCI</abbr></th>
|
||||
<th><abbr title="5+ Score Binomial Confidence Interval">5+ SBCI</abbr></th>
|
||||
<th><abbr title="10+ Score Binomial Confidence Interval">10+ SBCI</abbr></th>
|
||||
<% end %>
|
||||
<th>Notes</th>
|
||||
<th>Edits</th>
|
||||
@@ -41,8 +41,8 @@
|
||||
<td><%= link_to user.posts.count, posts_path(:tags => "user:#{user.name}") %></td>
|
||||
<td><%= user.posts.deleted.count %></td>
|
||||
<% if CurrentUser.user.is_janitor? %>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 1), :precision => 0 %></td>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 5), :precision => 0 %></td>
|
||||
<td><%= number_to_percentage Reports::UserPromotions.confidence_interval_for(user, 10), :precision => 0 %></td>
|
||||
<% end %>
|
||||
<td><%= link_to user.note_versions.count, note_versions_path(:search => {:updater_id => user.id}) %></td>
|
||||
<td><%= link_to user.post_update_count, post_versions_path(:search => {:updater_id => user.id}) %></td>
|
||||
|
||||
@@ -4,7 +4,7 @@ module Danbooru
|
||||
class Configuration
|
||||
# The version of this Danbooru.
|
||||
def version
|
||||
"2.25.0"
|
||||
"2.26.0"
|
||||
end
|
||||
|
||||
# The name of this Danbooru.
|
||||
|
||||
Reference in New Issue
Block a user