minor moderation fixes

This commit is contained in:
albert
2011-03-14 14:11:45 -04:00
parent 0830eb46c1
commit 7c45243d16
2 changed files with 2 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ class PostModerationController < ApplicationController
rescue_from Post::DisapprovalError, :with => :disapproval_error
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])
respond_to do |format|
format.html

View File

@@ -28,6 +28,7 @@ class Post < ActiveRecord::Base
validate :validate_parent_does_not_have_a_parent
attr_accessible :source, :rating, :tag_string, :old_tag_string, :last_noted_at
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 :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")}