app/models/post/file_methods.rb
# If this post is pending, and the user has too many pending posts, reject the upload.
# This must be done after set_image_status.
If this post is pending, and the user has too many pending posts, reject the upload.
This must be done after set_image_status.
If this post is pending and the user has too many pending posts reject the upload . This must be done after set_image_status .
def check_pending_count
    return if CONFIG["max_pending_images"].nil?
    return if status != "pending"
    return if user.nil? 
    return if user.is_contributor_or_higher?
    pending_posts = Post.where(:user_id => user_id, :status => "pending").count
    return if pending_posts < CONFIG["max_pending_images"]
    errors.add(:base, "You have too many posts pending moderation")
    false
  end
def check_pending_count return if CONFIG [ "max_pending_images" ] . nil? return if status != "pending" return if user . nil? return if user . is_contributor_or_higher? pending_posts = Post . where ( :user_id => user_id , :status => "pending" ) . count return if pending_posts < CONFIG [ "max_pending_images" ] errors . add ( :base , "You have too many posts pending moderation" ) false end
If this post is pending, and the user has too many pending posts, reject the upload.
If this post is pending and the user has too many pending posts reject the upload .
# implies anonymous upload