mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 17:11:07 +08:00
FIX: Use delete_all_posts_max to improve consistency when using the delete button from the admin view (#9194)
This commit is contained in:
@ -199,7 +199,8 @@ export default Controller.extend(CanCheckEmails, {
|
||||
|
||||
destroy() {
|
||||
const postCount = this.get("model.post_count");
|
||||
if (postCount <= 5) {
|
||||
const maxPostCount = this.siteSettings.delete_all_posts_max;
|
||||
if (postCount <= maxPostCount) {
|
||||
return this.model.destroy({ deletePosts: true });
|
||||
} else {
|
||||
return this.model.destroy();
|
||||
|
Reference in New Issue
Block a user