Select +Replies for bulk operations

This commit is contained in:
Robin Ward
2013-09-04 11:53:00 -04:00
parent dba1d79de2
commit f157ec1f91
20 changed files with 282 additions and 77 deletions

View File

@ -150,10 +150,11 @@ class PostsController < ApplicationController
params.require(:post_ids)
posts = Post.where(id: params[:post_ids])
posts = Post.where(id: post_ids_including_replies)
raise Discourse::InvalidParameters.new(:post_ids) if posts.blank?
# Make sure we can delete the posts
posts.each {|p| guardian.ensure_can_delete!(p) }
Post.transaction do