fixes
This commit is contained in:
@@ -433,7 +433,7 @@ class User < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def upload_limit
|
||||
deleted_count = Post.for_user(id).deleted.count
|
||||
deleted_count = Post.for_user(id).deleted.where("is_banned = false").count
|
||||
pending_count = Post.for_user(id).pending.count
|
||||
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", id).count
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class UserPresenter
|
||||
return "none"
|
||||
end
|
||||
|
||||
deleted_count = Post.for_user(user.id).deleted.count
|
||||
deleted_count = Post.for_user(user.id).deleted.where("is_banned = false").count
|
||||
pending_count = Post.for_user(user.id).pending.count
|
||||
approved_count = Post.where("is_flagged = false and is_pending = false and is_deleted = false and uploader_id = ?", user.id).count
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class AddHideDeletedPostsToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :hide_deleted_posts, :boolean, :null => false, :default => false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user