diff --git a/app/controllers/moderator/post/queues_controller.rb b/app/controllers/moderator/post/queues_controller.rb index 205677d10..6b3f9364a 100644 --- a/app/controllers/moderator/post/queues_controller.rb +++ b/app/controllers/moderator/post/queues_controller.rb @@ -1,15 +1,11 @@ module Moderator module Post class QueuesController < ApplicationController - RANDOM_COUNT = 12 - respond_to :html, :json before_action :approver_only skip_before_action :api_check def show - cookies.permanent[:moderated] = Time.now.to_i - if search_params[:per_page] cookies.permanent["mq_per_page"] = search_params[:per_page] end @@ -21,23 +17,6 @@ module Moderator respond_with(@posts) end - def random - cookies.permanent[:moderated] = Time.now.to_i - - ::Post.without_timeout do - @posts = ::Post.includes(:disapprovals, :uploader).order("posts.id asc").pending_or_flagged.available_for_moderation(false).reorder("random()").limit(RANDOM_COUNT) - @posts.each # hack to force rails to eager load - - if @posts.empty? - flash[:notice] = "Nothing left to moderate!" - redirect_to(params[:return_to] || posts_path) - return - end - end - - respond_with(@posts) - end - protected def per_page diff --git a/app/controllers/post_approvals_controller.rb b/app/controllers/post_approvals_controller.rb index 4377f80e3..79fbce004 100644 --- a/app/controllers/post_approvals_controller.rb +++ b/app/controllers/post_approvals_controller.rb @@ -3,7 +3,6 @@ class PostApprovalsController < ApplicationController respond_to :html, :xml, :json, :js def create - cookies.permanent[:moderated] = Time.now.to_i post = Post.find(params[:post_id]) @approval = post.approve! respond_with(@approval) diff --git a/app/controllers/post_disapprovals_controller.rb b/app/controllers/post_disapprovals_controller.rb index 7a9195608..c7c5dc072 100644 --- a/app/controllers/post_disapprovals_controller.rb +++ b/app/controllers/post_disapprovals_controller.rb @@ -4,7 +4,6 @@ class PostDisapprovalsController < ApplicationController respond_to :js, :html, :json, :xml def create - cookies.permanent[:moderated] = Time.now.to_i @post_disapproval = PostDisapproval.create(user: CurrentUser.user, **post_disapproval_params) respond_with(@post_disapproval) end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3a18abad1..3de619905 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -333,10 +333,6 @@ module ApplicationHelper content_for(:html_header, auto_discovery_link_tag(:atom, url, title: title)) end - def show_moderation_notice? - CurrentUser.can_approve_posts? && (cookies[:moderated].blank? || Time.at(cookies[:moderated].to_i) < 72.hours.ago) - end - protected def nav_link_match(controller, url) diff --git a/app/javascript/src/javascripts/mod_queue.js b/app/javascript/src/javascripts/mod_queue.js index 588c4634a..b97c2fab2 100644 --- a/app/javascript/src/javascripts/mod_queue.js +++ b/app/javascript/src/javascripts/mod_queue.js @@ -2,18 +2,6 @@ import Utility from './utility' let ModQueue = {}; -ModQueue.processed = 0; - -ModQueue.increment_processed = function() { - if (Utility.meta("random-mode") === "1") { - ModQueue.processed += 1; - - if (ModQueue.processed === 12) { - window.location = Utility.meta("return-to"); - } - } -} - ModQueue.detailed_rejection_dialog = function() { $("#post_disapproval_post_id").val($(this).data("post-id")); $("#detailed-rejection-dialog").find("form")[0].reset(); @@ -23,7 +11,6 @@ ModQueue.detailed_rejection_dialog = function() { } $(function() { - $(window).on("danbooru:modqueue_increment_processed", ModQueue.increment_processed); $(document).on("click.danbooru", ".quick-mod .detailed-rejection-link", ModQueue.detailed_rejection_dialog); }); diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index f0abf5cee..44a06d7d0 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -122,10 +122,6 @@ <%= render "users/dmail_notice" %> <% end %> - <% if CurrentUser.user.can_approve_posts? %> - <%= render "moderator/post/queues/notice" %> - <% end %> -
Here are twelve random posts that are up for moderation. See if any of them are worth approving. Once you finish processing all of them you will be taken to the previous URL (<%= params[:return_to] %>).
- -