minor moderation fixes
This commit is contained in:
@@ -4,7 +4,7 @@ class PostModerationController < ApplicationController
|
|||||||
rescue_from Post::DisapprovalError, :with => :disapproval_error
|
rescue_from Post::DisapprovalError, :with => :disapproval_error
|
||||||
|
|
||||||
def moderate
|
def moderate
|
||||||
@search = Post.order("id asc").pending.available_for_moderation.search(:tag_match => params[:query])
|
@search = Post.order("id asc").pending_or_flagged.available_for_moderation.search(:tag_match => params[:query])
|
||||||
@posts = @search.paginate(:page => params[:page])
|
@posts = @search.paginate(:page => params[:page])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class Post < ActiveRecord::Base
|
|||||||
validate :validate_parent_does_not_have_a_parent
|
validate :validate_parent_does_not_have_a_parent
|
||||||
attr_accessible :source, :rating, :tag_string, :old_tag_string, :last_noted_at
|
attr_accessible :source, :rating, :tag_string, :old_tag_string, :last_noted_at
|
||||||
scope :pending, where(["is_pending = ?", true])
|
scope :pending, where(["is_pending = ?", true])
|
||||||
|
scope :pending_or_flagged, where(["(is_pending = ? OR is_flagged = ?)", true, true])
|
||||||
scope :undeleted, where(["is_deleted = ?", false])
|
scope :undeleted, where(["is_deleted = ?", false])
|
||||||
scope :visible, lambda {|user| Danbooru.config.can_user_see_post_conditions(user)}
|
scope :visible, lambda {|user| Danbooru.config.can_user_see_post_conditions(user)}
|
||||||
scope :commented_before, lambda {|date| where("last_commented_at < ?", date).order("last_commented_at DESC")}
|
scope :commented_before, lambda {|date| where("last_commented_at < ?", date).order("last_commented_at DESC")}
|
||||||
|
|||||||
Reference in New Issue
Block a user